oprofile Log


Commit Date  
[01c7ce] (5.1 kB) by Maynard Johnson Maynard Johnson

Make opreport use <cur_dir>/oprofile data for default session-dir

Since operf will be the recommended profiling tool in the future
(instead of opcontrol) and since operf stores the sample data by
default in <cur_dir>/oprofile_data, it makes sense for opreport
and other oprofile post-processing tools to look first in
<cur_dir/oprofile_data; then, if no samples are found there, the
tool should fall back to the "standard" /var/lib/oprofile session-dir.

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

2012-07-03 19:15:19 View
Download
[589207] (4.9 kB) by Maynard Johnson Maynard Johnson

Remove unused "--kernel-buffersize-multiplier" option from operf

The "--kernel-buffersize-multiplier" option was not wired in to
perform any actions. In the course of wiring it in to the mmap
call (where the operf record process mmap's the perf_events kernel
data) and performing functional tests, I found that bumping up
the mmap size had little noticeable beneficial effect -- perhaps
even *no* effect at all. I expected that the perf_event_header type
of PERF_RECORD_LOST would be an indication that a larger kernel
buffer (i.e., mmap'ed area) was needed. I was able to force such
"LOST" samples by using a very high sampling rate, yet increasing
the number mmap pages did not eliminate the LOST samples. So I
removed this option from the code and the man page.

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

2012-06-25 20:54:33 View
Download
[3d9018] (5.1 kB) by Maynard Johnson Maynard Johnson

Add comment in operf man page about using ophelp to list available events

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

2012-06-12 18:56:02 View
Download
[d17626] (5.0 kB) by Maynard Johnson Maynard Johnson

Add reporting of profiling statistics to operf.

This patch adds the recording of the following stats:

OPERF_SAMPLES, /**< nr. samples */
OPERF_KERNEL, /**< nr. kernel samples */
OPERF_PROCESS, /**< nr. userspace samples */
OPERF_INVALID_CTX, /**< nr. samples lost due to sample address not in expected range for domain */
OPERF_LOST_KERNEL, /**< nr. kernel samples lost */
OPERF_LOST_SAMPLEFILE, /**< nr samples for which sample file can't be opened */
OPERF_LOST_NO_MAPPING, /**< nr samples lost due to no mapping */
OPERF_NO_APP_KERNEL_SAMPLE, /**<nr. user ctx kernel samples dropped due to no app context available */
OPERF_NO_APP_USER_SAMPLE, /**<nr. user samples dropped due to no app context available */
OPERF_BT_LOST_NO_MAPPING, /**<nr. backtrace samples dropped due to no mapping */
OPERF_LOST_INVALID_HYPERV_ADDR, /**<nr. hypervisor samples dropped due to address out-of-range */
OPERF_RECORD_LOST_SAMPLE, /**<nr. samples lost reported by perf_events kernel */

At the completion of a profiling run, these stats are written to the
operf.log file (new in this patch) at <session_dir>/samples.

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

2012-06-12 18:38:47 View
Download
[88e125] (4.8 kB) by Maynard Johnson Maynard Johnson

Switch operf from popt to getopt

Using popt to parse command line arguments for operf did not
work properly for cases where an application to profile is
passed in, along with some app arguments that happen to have
option names the same as operf. Therefore, operf has been
changed to use getopt_long. This decision to not use popt
negated the reason for the changes made to oprofile's libopt++
popt_option.[c|h] files back when operf was first introduced;
thus, those changes are reverted with this patch.

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

2012-06-11 15:10:58 View
Download
[b036fd] (4.8 kB) by Maynard Johnson Maynard Johnson

Remove reset option from operf and replace with append option.

By default, operf will now move old profile data from <session_dir>/samples/current
to <session_dir>/samples/previous. If a 'previous' profile already existed,
it will be replaced. If the --append option is passed, old profile data is left
in place and new profile data will be added to it, and the 'previous' profile
(if one existed) will remain untouched.

operf man page updates:
Aside from replacing the --reset option with the --append option, several unrelated
fixes were made, including adding the missing --vmlinux option.

2012-05-22 13:54:38 View
Download
[d77ab4] (4.0 kB) by Maynard Johnson Maynard Johnson

Make new --separate-thread option for operf

This patch reverses the earlier decision to do "separate=thread" type
of functionality by default. So now there is a command line option
to operf called "--separate-thread". I decided to make this an option
for two reasons: 1) operf run in system-wide mode required the user to
either pass a tgid spec or to use "--merge=tgid" or the report was
unreadable; 2) typically, the Java JIT compiler will spawn threads
to execute JITed code; so when using operf to profile a single Java app,
the resulting report is usually unreadable without using a tid spec or
"--merge=tid".

2012-05-03 19:21:08 View
Download
[0ef7e7] (3.4 kB) by Maynard Johnson Maynard Johnson

Add support for callgraph profiling

Unlike legacy oprofile (using opcontrol), the --calllgraph
option of operf is boolean. The perf_events kernel subsystem
records the whole callstack, so there's no way to use the
depth value used in legacy oprofile.

2012-04-11 16:18:45 View
Download
[b2ce90] (3.3 kB) by Maynard Johnson Maynard Johnson

Minor bug fixes and performance improvement for system-wide mode.

The operf_sfile hashing algorithm was modified from legacy hashing
to use either a build-id or a checksum. I had not yet implemented the
getting the build-id, so was falling back to the checksum. Getting
the checksum (via gelf_checksum) was terribly expensive, especially
noticeable when running with the system-wide option. So I spent
some time comparing using a build-id (obtained from the binary file's
NT_GNU_BUILD_ID note) for the hashing algorithm versus simply hashing
on a substring of the image name. The simple string hash was as
effective as the build-id method. Both were way better than the checksum
technique. In the end, I removed all of the checksum and build-id stuff,
and settled on the image name string hash method for finding operf_sfiles.

Aside from the above big performance improvement described above, I also
created a global multimap for holding operf_mmap objects. The operf_mmap
encapsulates an MMAP event. In system-wide mode, we get lots of MMAP events
for the same libraries being used by many different processes, so it was
logical to create just one operf_mmap object per unique binary.

2012-03-27 23:03:45 View
Download
[46f3e3] (2.9 kB) by Maynard Johnson Maynard Johnson

Add support for system-wide profiling to libperf_events and operf

This patch makes changes in libperf_events to support the system-wide
profiling that the oprofile daemon will need to use. The patch also
adds support for the --system-wide option in operf as an initial step
to validate the functionality of libperf_events.

2012-03-22 13:49:58 View
Download
[1fc65f] (2.5 kB) by Breno Leitao Breno Leitao , pushed by Maynard Johnson Maynard Johnson

Add the new operf.1.in file for the new operf man page

I neglected to do this on the previous commit. Doing so now.

2012-03-20 14:45:39 View
Download

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks