/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (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 2005 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
#include <mdb/mdb_param.h>
#include <mdb/mdb_modapi.h>
#include "lgrp.h"
#include "cpupart_mdb.h"
/* ARGSUSED */
static int
{
return (WALK_NEXT);
}
#ifdef _LP64
#if defined(__amd64)
#else
#endif
#else
#endif
int
{
proc_t p;
kthread_t t;
return (DCMD_ERR);
}
mdb_printf("|\n");
"PROC");
for (i = npri - 1; i >= 0; i--) {
mdb_warn("failed to read kthread_t at %p",
taddr);
return (DCMD_ERR);
}
if (mdb_vread(&p, sizeof (p),
mdb_warn("failed to read proc_t at %p",
t.t_procp);
return (DCMD_ERR);
}
}
}
return (DCMD_OK);
}
/* ARGSUSED */
int
{
int cpusetsize;
int _ncpu;
return (DCMD_USAGE);
if (!(flags & DCMD_ADDRSPEC)) {
== -1) {
mdb_warn("can't walk 'cpupart'");
return (DCMD_ERR);
}
return (DCMD_OK);
}
if (DCMD_HDRSPEC(flags)) {
mdb_printf("%3s %?s %4s %4s %4s\n",
"ID",
"ADDR",
"NRUN",
"#CPU",
"CPUS");
}
return (DCMD_ERR);
}
mdb_printf("%3d %?p %4d %4d ",
addr,
mdb_printf("\n");
return (DCMD_OK);
}
/*
* figure out what cpus we've got
*/
mdb_warn("symbol '_ncpu' not found");
return (DCMD_ERR);
}
/*
* allocate enough space for set of longs to hold cpuid bitfield
*/
addr) == -1) {
mdb_warn("unable to walk cpupart_cpulist");
return (DCMD_ERR);
}
mdb_printf("\n");
/*
* If there are any threads on kp queue and -v is specified
*/
return (DCMD_ERR);
}
return (DCMD_OK);
}
typedef struct cpupart_cpulist_walk {
int ccw_cpusleft;
int
{
return (WALK_ERR);
}
return (WALK_NEXT);
}
int
{
int status;
return (WALK_ERR);
}
return (status);
ccw->ccw_cpusleft--;
if (ccw->ccw_cpusleft < 0) {
mdb_warn("cpu count doesn't match cpupart list");
return (WALK_ERR);
}
if (ccw->ccw_cpusleft != 0) {
mdb_warn("cpu count doesn't match cpupart list");
return (WALK_ERR);
}
return (WALK_DONE);
}
return (WALK_NEXT);
}
int
{
mdb_warn("failed to find 'cp_default'\n");
return (WALK_ERR);
}
return (WALK_NEXT);
}
int
{
int status;
mdb_warn("unable to read cpupart at %p",
return (WALK_ERR);
}
wsp->walk_cbdata);
return (status);
return (WALK_DONE);
return (WALK_NEXT);
}