|
====
|
|
|
~]${nbsp}pass:attributes[{blank}][command]#opreport# Profiling through timer interrupt TIMER:0| samples| %|
|
|
|
25926 97.5212 no-vmlinux 359 1.3504 pi 65 0.2445 Xorg 62 0.2332 libvte.so.4.4.0 56 0.2106 libc-2.3.4.so 34 0.1279 libglib-2.0.so.0.400.7 19 0.0715 libXft.so.2.1.2 17 0.0639 bash 8 0.0301 ld-2.3.4.so 8 0.0301 libgdk-x11-2.0.so.0.400.13 6 0.0226 libgobject-2.0.so.0.400.7 5 0.0188 oprofiled 4 0.0150 libpthread-2.3.4.so 4 0.0150 libgtk-x11-2.0.so.0.400.13 3 0.0113 libXrender.so.1.2.2 3 0.0113 du 1 0.0038 libcrypto.so.0.9.7a 1 0.0038 libpam.so.0.77 1 0.0038 libtermcap.so.2.0.8 1 0.0038 libX11.so.6.2 1 0.0038 libgthread-2.0.so.0.400.7 1 0.0038 libwnck-1.so.4.9.0
|
|
|
A directory exists in `/dev/oprofile/` for each counter. For example, if there are 2 counters, the directories `/dev/oprofile/0/` and `/dev/oprofile/1/` exist.
|
|
|
After changing any of the options, save them by clicking the btn:[Save and quit] button. The preferences are written to `/root/.oprofile/daemonrc`, and the application exits. Exiting the application does not stop OProfile from sampling.
|
|
|
After successful setup, you can apply the standard profiling and analyzing tools described in previous sections
|
|
|
-agentlib:pass:quotes[_jvmti_oprofile_]
|
|
|
-agentlib:/usr/lib64/oprofile/libjvmti_oprofile.so
|
|
|
Analyzing the Data
|
|
|
Back up the executable and the sample files
|
|
|
Be extremely careful when setting sampling rates. Sampling too frequently can overload the system, causing the system to appear frozen or causing the system to actually freeze.
|
|
|
[[br-oprofile_online_documentation]] .Online Documentation
|
|
|
By default, [command]#operf# stores the profiling data in the `pass:attributes[{blank}]_current_dir_pass:attributes[{blank}]/oprofile_data/` directory. You can change to a different location with the [option]`--session-dir` option. The usual post-profiling analysis tools such as [command]#opreport# and [command]#opannotate# can be used to generate profile reports. These tools search for samples in `pass:attributes[{blank}]_current_dir_pass:attributes[{blank}]/oprofile_data/` first. If this directory does not exist, the analysis tools use the standard session directory of `/var/lib/oprofile/`. Statistics, such as total samples received and lost samples, are written to the `pass:attributes[{blank}]_session_dir_pass:attributes[{blank}]/samples/operf.log` file.
|
|
|
~]# cat /dev/oprofile/0/count
|
|
|
~]# cat /dev/oprofile/cpu_type
|
|
|
Categorization of Samples
|
|
|
[command]#all# — Generate per-application profiles for libraries and per-application profiles for the kernel and kernel modules.
|
|
|
[command]#kernel# — Generate per-application profiles for the kernel and kernel modules.
|
|
|
[command]#kill -SIGINT operf-PID#
|
|
|
[command]#library# — Generate per-application profiles for libraries.
|
|