1 1.1 christos ************************************************************************** 2 1.1 christos * Notes for all scripts that trace Java using the hotspot provider. 3 1.1 christos * 4 1.1 christos * $Id: ALLjava_notes.txt,v 1.1.1.1 2015/09/30 22:01:09 christos Exp $ 5 1.1 christos * 6 1.1 christos * COPYRIGHT: Copyright (c) 2007 Brendan Gregg. 7 1.1 christos ************************************************************************** 8 1.1 christos 9 1.1 christos * I see "drops" 10 1.1 christos 11 1.1 christos If you see the following output, 12 1.1 christos 13 1.1 christos dtrace: 2547 drops on CPU 0 14 1.1 christos 15 1.1 christos This means that JVM events (usually methods) were executed too quickly for 16 1.1 christos DTrace to keep up, and as a safety measure DTrace has let events slip by. 17 1.1 christos This means, at least, that the output is missing lines. At worst, the 18 1.1 christos output may contain corrupted values (time deltas between events that were 19 1.1 christos dropped). 20 1.1 christos 21 1.1 christos If you see drops, you should first ask yourself whether you need to be 22 1.1 christos tracing such frequent events at all - is there another way to get the same 23 1.1 christos data? For example, see the j_profile.d script, which uses a different 24 1.1 christos technique (sampling) than most of the other Java scripts (tracing). 25 1.1 christos 26 1.1 christos You can try tweaking DTrace tunables to prevent DTrace from dropping events. 27 1.1 christos A key tunable is "bufsize", and can be set in scripts like so, 28 1.1 christos 29 1.1 christos #pragma D option bufsize=32m 30 1.1 christos 31 1.1 christos That line means that 32 Mbytes will be allocated to the DTrace primary 32 1.1 christos buffer per-CPU (how depends on bufpolicy). If you have many CPUs, say 8, 33 1.1 christos then the above line means that 256 Mbytes (32 * 8) will be allocated as a 34 1.1 christos buffer while your D script is running. 35 1.1 christos 36