Commit [7e5e18] Maximize Restore History

operf does not properly sample child threads for already-running app

Example: When passing the 'java' command directly to operf, samples are
collected for all of the threads created by the JVM. However, if the
Java app is already running when the user starts operf with either
'--pid' or '--system-wide' option, zero samples are collected on the
child threads of the JVM. Note: The user program that is JITed by the
JVM is executed by a child thread.

This patch addresses the problem by:
- Keeping a list of child processes
- Synthesizing PERF_RECORD_COMM events for the main JVM process and all
the child processes
- Calling perf_event_open for the main JVM process and all child processes

These changes entailed some fairly major restructuring of some functions
and data structures of the operf_record class.

Signed-off-by: Maynard Johnson <maynardj@us.ibm.com>

Maynard Johnson Maynard Johnson 2013-02-21

changed libperf_events
changed libperf_events/operf_counter.cpp
changed libperf_events/operf_counter.h
changed libperf_events/operf_event.h
changed libperf_events/operf_stats.cpp
changed libperf_events/operf_stats.h
changed libperf_events/operf_utils.cpp
changed libperf_events/operf_utils.h
changed pe_profiling
changed pe_profiling/operf.cpp
libperf_events
Directory.
libperf_events/operf_counter.cpp Diff Switch to side-by-side view
Loading...
libperf_events/operf_counter.h Diff Switch to side-by-side view
Loading...
libperf_events/operf_event.h Diff Switch to side-by-side view
Loading...
libperf_events/operf_stats.cpp Diff Switch to side-by-side view
Loading...
libperf_events/operf_stats.h Diff Switch to side-by-side view
Loading...
libperf_events/operf_utils.cpp Diff Switch to side-by-side view
Loading...
libperf_events/operf_utils.h Diff Switch to side-by-side view
Loading...
pe_profiling
Directory.
pe_profiling/operf.cpp Diff Switch to side-by-side view
Loading...