/*
* stacksize.d - measure stack size for running threads.
* Written using DTrace (Solaris 10 3/05).
*
* $Id: stacksize.d 3 2007-08-01 10:50:08Z brendan $
*
* USAGE: stacksize.d # hit Ctrl-C to end sample
*
* FIELDS:
* value size of the user stack
* count number of samples at this size
*
* SEE ALSO: pmap(1)
*
* COPYRIGHT: Copyright (c) 2006 Jonathan Adams
*
* 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.
*
* See the License for the specific language governing permissions
* and limitations under the License.
*
* CDDL HEADER END
*
* 16-Feb-2006 Jonathan Adams Created this.
* 16-Feb-2006 " " Last update.
*/
{
trace("Sampling... Hit Ctrl-C to end\n");
}
{
this->stkinfoptr = 0;
}
/execname != "sched"/
{
}
{
sizeof (stack32_t));
}
{
sizeof (stack_t));
}
{
}
{
}
{
printf("\nErrors:\n");
}