/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include "mdinclude.h"
/*
* Display an arbitrary bitmap by showing the set bits in the array.
* Output will be <start>-<end> for ranges or <position> for singleton bits.
*/
static void
{
int i;
int need_comma = 0;
for (i = 0; i < size; i++) {
if (first_set == -1) {
first_set = i;
}
} else {
if (first_set != -1) {
if (first_set != (i-1)) {
mdb_printf("%s%u-%u",
first_set, (i-1));
} else {
mdb_printf("%s%u",
}
need_comma = 1;
first_set = -1;
}
}
}
if (first_set != -1) {
size-1);
}
mdb_printf("\n");
}
/*
* Print uchar_t sized count fields (typically un_pernode_dirty_map entries)
*/
static void
{
int i;
int need_comma = 0;
for (i = 0; i < size; i++) {
if (bm[i]) {
need_comma = 1;
}
}
mdb_printf("\n");
}
static void
{
int i;
int need_comma = 0;
for (i = 0; i < size; i++) {
if (bm[i]) {
need_comma = 1;
}
}
mdb_printf("\n");
}
/*
* Print the associated bitmaps for the specified mm_unit_t
* These are:
* un_pernode_dirty_bm
* un_goingclean_bm
* un_dirty_bm
* un_goingdirty_bm
* un_resync_bm
*
* Associated counts for unit:
* un_pernode_dirty_sum[] (uchar_t)
* un_outstanding_writes[] (ushort_t)
*
*/
/* ARGSUSED */
int
{
unsigned char *rr_resync_bm;
int i;
unsigned short *rr_ow;
/* just enough for un_pernode_dirty_bm[] plus three digits */
if (argc != 0)
return (DCMD_USAGE);
if (!(flags & DCMD_ADDRSPEC)) {
mdb_warn("No mm_unit_t address specified");
return (DCMD_ERR);
}
return (DCMD_ERR);
}
return (DCMD_ERR);
}
return (DCMD_ERR);
}
return (DCMD_ERR);
}
return (DCMD_ERR);
}
mdb_warn("failed to read un_pernode_dirty_sum at %p\n",
un_pnds);
return (DCMD_ERR);
}
return (DCMD_ERR);
}
/*
* Load all the un_pernode_bm[] entries and iterate through the non-
* NULL entries
*/
for (i = 0; i < 128; i++) {
if (un_pernode_bm) {
"un_pernode_dirty_bm[%d]", i);
un_pernode_bm) == -1) {
mdb_warn("failed to read %s at %p\n",
return (DCMD_ERR);
}
}
}
return (DCMD_OK);
}