My customer still thinks this is a bug: ********** We think that DTrace is not working as designed. Therefore we wanted to report a bug for DTrace. Thank you for the answers from mailing list, but these do not solve our problem. The DTrace script that we describe in the document results in "dynamic variable drops", if the system is heavily loaded for a longer period of time (around 24 hours). We assume that this is not the intended behavior of DTrace. We use a DTrace script with thread local variables (self->) and still get "dynamic variable drops". DTrace has to be used for a longer period of time in our systems, where the utilization of the system can be high. In case of "dynamic variable drops" incorrect tracing is performed. As described in the previous document we think our script is working correctly and therefore we think that DTrace is working incorrectly. We would like a solution for this. The previous document contains some assumptions that we had to make about DTrace, but which we could verify using the DTrace documentation. In our script we use thread local variables (self->). We assume that these variables result in at most one variable per hardware thread(which is a part of a CPU). Because the thread local variable at a CPU can be reused in consecutive calls of the probes and we use no other variables, we assume that our script is not causing a full dynamic variable space. But, DTrace appears to be doing something else that causes the dynamic variable space to get full (for a loaded system after 24 hours), because we still get "dynamic variable drops". This makes the DTrace solution unreliable. We would like to see a solution for this problem. I attached the version of the DTrace script that we use. For its configuration, this script depends upon a process for its configuration. After running this script for approximately 24 hours on a heavily loaded machine, we get dynamic variable drops. ********** It is my belief that this is not a bug, but I need something more to give the customer to convince him of this. I've attached his script CSET.d Thanks
On 07/01/11 10:58, Jim Mauro wrote: I'm not sure I understand what is being asked here, but I'll take a shot... |
#!/usr/sbin/dtrace -s /*----------------------------------------------------------------------------| | | | DTrace script | | | |-----------------------------------------------------------------------------| | | Ident : CSET.d | Description : This script traces thread executions | | History | yyyy-mm-dd : <swchg> <author> [<platform> <release>] | 2011-03-16 : Initial creation tbijlsma | 2011-03-16 : <SWCHG00371518> <tbijlsma> | |-----------------------------------------------------------------------------| | | | Copyright (c) 2011, ASML Holding N.V. (including affiliates). | | All rights reserved | | | |----------------------------------------------------------------------------*/
/* Do not provide additional output*/ #pragma D option quiet /* Store the printf values in a circular buffer*/ #pragma D option bufpolicy=ring /* Necessary to signal CSET.c */ #pragma D option destructive uint64_t Stimercorrection; /* Offset set by the pid$1::configDtrace:entry probe*/ int *setOne; /* Pointer to an int with value one */ /* Initially sets Stimercorrection to zero */ BEGIN { Stimercorrection = 0; } /* This probe sets the moment that CSET calls the function "configDtrace" as * time 0 and signals the function, by setting the value of arg0 to 1 */ pid$1::configDtrace:entry { setOne = alloca(sizeof(int)); *setOne = 1; Stimercorrection = timestamp; copyout(setOne,arg0,sizeof(int)); } /* When a SW thread starts executing, we store the start time */ sched:::on-cpu /execname!="sched" && Stimercorrection/ { self->startTime = timestamp - Stimercorrection; } /* When a SW thread stops executing at a processor, print information for the * event in the ring buffer */ sched:::off-cpu /self->startTime && execname!="sched" && Stimercorrection/ { printf("%d|%d|%i|%i|%i|%s\n", self->startTime, /* start time*/ timestamp - Stimercorrection, cpu, /*number of CPU*/ tid, /*current thread*/ pid, /*process id*/ execname /*process name*/ ); self->startTime = 0; } /* If the main task calls the function retrieveTrace, we stop the DTrace script * and the values in the ring buffer will be printed */ pid$1::retrieveTrace:entry { exit(0); } /* Stop the DTrace script if kill -9 has been called for CSET * arg0 contains PID of killed process and arg1 the signal */ syscall::kill:entry /arg0==$1 && ( arg1==9 || arg1==15 )/ { exit(0); } /* Finally we print "EOT" to mark the end of a trace */ END { printf("EOT\n"); }
_______________________________________________ dtrace-discuss mailing list dtrace-discuss@opensolaris.org