/*
* 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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* Display processor group information
*/
#include "pg.h"
#include <mdb/mdb_modapi.h>
/*
* PG hardware types indexed by hardware ID
*/
char *pg_hw_names[] = {
"hw",
"ipipe",
"cache",
"fpu",
"mpipe",
"chip",
"memory",
"active_pwr",
"idle_pwr",
};
/*
* Convert HW id to symbolic name
*/
static char *
{
}
/*
* Display processor group.
*/
/* ARGSUSED */
int
{
/* Should provide an address */
if (! (flags & DCMD_ADDRSPEC))
return (DCMD_USAGE);
return (DCMD_USAGE);
if (flags & DCMD_PIPE_OUT)
mdb_printf("%6s %?s %6s %7s %11s %5s %5s\n",
"PGID",
"ADDR",
"PHYSID",
"CLASS",
"HARDWARE",
"#CPUs",
"LOAD");
}
/*
* Read pg at specified address
*/
return (DCMD_ERR);
}
/*
* In quiet mode just print pg address
*/
if (opt_q) {
return (DCMD_OK);
}
return (DCMD_ERR);
}
return (DCMD_ERR);
}
is_cmt = 1;
}
return (DCMD_ERR);
}
/*
* Display the physical PG info.
*/
mdb_printf("%6d %?p %6d %7s %11s %5d %5d\n",
} else {
/*
* Display the basic PG info.
*/
mdb_printf("%6d %?p %7s %5d\n",
}
return (DCMD_OK);
}