// trace the program $ lttng-simple -u --enable-libc-wrapper -- gnome-calculator // display events $ babeltrace gnome-calculator-u/ [10:48:49.808255177] malloc: { size = 40, ptr = 0xCA8220 } [10:48:49.808256389] free: { ptr = 0xCA8220 } ... // count events and look for lost events $ javeltrace analyze -i ctf gnome-calculator-u/... number of streams 1 number of packets 1,058 number of events 181,879 number of CPUs 8 number of lost events 0
This experiment shows that there are about 182 thousands memory allocation events to start a calculator!
Checking for lost events with javeltrace is recommended. The default buffer size in UST is quite small, and in consequence lost events occurs even with very light load, like starting the calculator with memory allocation tracing. The tool lttng-simple setups buffers of 16MB to make it safer.
The next step is of course to display this data according to time and compare it to physical pages allocated by the operating system with a kernel trace.
Happy hacking!
Aucun commentaire:
Enregistrer un commentaire