Sabra Gargouri | 17 Apr 15:41 2014
Picon

Oprofile Results vs Dynamic tracing tool based on Kprobes

Hi,
I 'm trying to compare results generated by Oprofile in one side and by a dynamic tracing tool based on Kprobes on other sides. I used both to test the same use case.
Oprofile show 84% of idle time (poll_idle function) however only 63% with the tracing tool .
Oprofile and the tracing tool don't give the same kind of results but I'm able to compute in percentage idle time for the tracing tool (by inspecting the process with pid 0).
At the end I'am confusing why the results are different between the two tools.

Regards
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
BAJAJ, POOJA (POOJA | 14 Apr 06:39 2014

Issue generating report using Oprofile

Hi,

 

I am using Oprofile as a tool to profile my application.

Server used: RHEL 6.5

I am getting error while generating reports.

Can you pls. suggest if I need to set/use some specific parameters ?

 

OSPVM1root#/usr/bin/opreport -lc

error: no sample files found: profile specification too strict ?

OSPVM1root#/usr/bin/opreport -V all

 

Archive:

Matched sample files: 0

profile_classes:

event:

cpuinfo:

 

error: no sample files found: profile specification too strict ?

 

 

--
Thanks & Regards
Pooja Bajaj
Lead Engineer
Alcatel-Lucent, India 
Payment BU 
Phone:+ 91- 124-475-3574| Onnet: 2767-3574 

 

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
Maynard Johnson | 7 Apr 19:35 2014
Picon

[PATCH] Allow root to remove old jitdump files from /tmp/.oprofile/jitdump

Daniel (or anyone else), do you see any reason why we shouldn't allow root to
delete old jitdump files?

----------------------------------------------------------------

Allow root to remove old jitdump files from /tmp/.oprofile/jitdump

Currently, the opjitconv program reqiress that the owner of an old
jitdump file and the user running operf must be the same in order
to allow deletion of said jitdump file. The root user should be
allowed to do this, too, which is what this patch does.

Signed-off-by: Maynard Johnson<maynardj <at> us.ibm.com>
Signed-off-by: Maynard Johnson <maynardj <at> us.ibm.com>
---
 opjitconv/opjitconv.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/opjitconv/opjitconv.c b/opjitconv/opjitconv.c
index 07b793a..3314c5c 100644
--- a/opjitconv/opjitconv.c
+++ b/opjitconv/opjitconv.c
 <at>  <at>  -574,7 +574,7  <at>  <at>  static void _add_jitdumps_to_deletion_list(void * all_jitdumps, char const * jit
 			continue;
 		}
 		close(fd);
-		if (geteuid() == mystat.st_uid) {
+		if (!non_root || geteuid() == mystat.st_uid) {
 			struct jitdump_deletion_candidate * jdc =
 					xmalloc(sizeof(struct jitdump_deletion_candidate));
 			jdc->name = xstrdup(dmpfile->name);
--

-- 
1.7.1

------------------------------------------------------------------------------
Put Bad Developers to Shame
Dominate Development with Jenkins Continuous Integration
Continuously Automate Build, Test & Deployment 
Start a new project now. Try Jenkins in the cloud.
http://p.sf.net/sfu/13600_Cloudbees
San Martino | 25 Mar 19:01 2014
Picon

Profiling with --callgraph on ARM Cortex A8 reports only [self] entries

Hello,

I am trying to get a callgraph from a stripped binary running on my ARM Cortex A8, Linux 2.6.37 (with oprofile 0.9.9 installed).

Unfortunately when I add --callgraph to operf my system crashes. However, when using the legacy tool, opcontrol --callgraph=5/opcontrol start, then some data seems to be collected (and, yes, opcontrol --status outputs the correct depth).

With the data collected that way, I can then post-process the informations on my x86-PC, where I have the seperate debugging symbols corresponding to the stripped binary that I profiled above.

The problem is that now opreport only reports [self] entries when I report via -l -g --callgraph options, that is, I cannot see any callgraphs showing the relationships between calls.

Do you know why and/or a possible solution?
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
oprofile-list mailing list
oprofile-list <at> lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oprofile-list
Maynard Johnson | 25 Mar 01:20 2014
Picon

test message

I've gotten a report from a user that there's a problem with the mailing list, so this is just a test message.

-Maynard

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
William Cohen | 14 Mar 20:19 2014
Picon

[PATCH] Make op_bfd::get_kallsym_symbols() 32/64-bit agnostic

The size of %lx is 32 bits on 32-bit machine and 64-bits on 64-bit
machines.  However, bfd_vma is always a 64-bit value regardless
whether the processor is a 32-bit or 64-bit architecture.  The
get_kallsym_symbols() used the %lx which only matched up on the 64-bit
machines.  This changes the code to always read things into a
"unsigned long long" variable and then copy that value into the
bfd_vma variable to allow the code to compile on both 32-bit and
64-bit machine

Signed-off-by: William Cohen <wcohen <at> redhat.com>
---
 libutil++/op_bfd.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/libutil++/op_bfd.cpp b/libutil++/op_bfd.cpp
index 1d7ea8c..c92d532 100644
--- a/libutil++/op_bfd.cpp
+++ b/libutil++/op_bfd.cpp
 <at>  <at>  -303,7 +303,7  <at>  <at>  void op_bfd::get_kallsym_symbols(symbols_found_t & symbols, ifstream& infile)
 	stringstream iss;

 	bfd_vma start = 0, start_prev = 0;
-	unsigned long long length;
+	unsigned long long length, start_value;
 	bool ignore_symbol = true;
 	bfd_vma base_addr = 0;
 	name_prev = "";
 <at>  <at>  -319,7 +319,8  <at>  <at>  void op_bfd::get_kallsym_symbols(symbols_found_t & symbols, ifstream& infile)
 		iss >> type;
 		iss >> name;

-		sscanf(address_str.c_str(), "%lx", &start);
+		sscanf(address_str.c_str(), "%llx", &start_value);
+		start = start_value;

 		if (start_prev == start)
 			length = 0;
--

-- 
1.8.3.1

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
Josh Triplett | 10 Mar 04:09 2014

[PATCH v2 0/7] Allow disabling HW_BREAKPOINTS, PERF_EVENTS, INSTRUCTION_DECODER, IRQ_WORK, ANON_INODES

This patch series makes it possible to disable HW_BREAKPOINTS, PERF_EVENTS,
INSTRUCTION_DECODER, IRQ_WORK, and ANON_INODES.  Without this patch series, all
of these config options get automatically selected on x86, making them
impossible to disable.

This is a revival of a previous patch series from Andi Kleen sent in October
2013.  I rebased it to apply to the latest kernel, fixed issues raised in
response to the original patch (in particular re-collecting size deltas), and
added one additional patch to support disabling ANON_INODES.

Overall, this patch series saves 162k with allnoconfig.  (I used a minimal
allnoconfig generated by the allnoconfig from -mm and -next, which includes my
patch to disable everything behind EMBEDDED/EXPERT/DEBUG_KERNEL as well.)

Here's the updated size data included in the revised commit message for patch
6:

   text        data     bss     dec     hex filename
 788816      131952 1214432 2135200  2094a0 vmlinux-allnoconfig-with-perf
 666361       93020 1214368 1973749  1e1df5 vmlinux-allnoconfig-no-perf

bloat-o-meter summary:
add/remove: 1/1040 grow/shrink: 1/25 up/down: 82/-152214 (-152132)

For the additional savings from ANON_INODES, see the last patch's commit
message.

Here's the exact diff between the two configurations:
~/src/linux$ diff -U0 dotconfig-perf-events dotconfig-no-perf-events
--- dotconfig-perf-events	2014-03-09 18:58:28.280363186 -0700
+++ dotconfig-no-perf-events	2014-03-09 18:32:40.192726592 -0700
 <at>  <at>  -8 +7,0  <at>  <at> 
-CONFIG_INSTRUCTION_DECODER=y
 <at>  <at>  -39 +37,0  <at>  <at> 
-CONFIG_IRQ_WORK=y
 <at>  <at>  -115 +112,0  <at>  <at> 
-CONFIG_ANON_INODES=y
 <at>  <at>  -139,2 +136  <at>  <at> 
-CONFIG_PERF_EVENTS=y
-# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
+# CONFIG_PERF_EVENTS is not set
 <at>  <at>  -148 +143,0  <at>  <at> 
-CONFIG_OPROFILE_NMI_TIMER=y
 <at>  <at>  -164,2 +158,0  <at>  <at> 
-CONFIG_HAVE_HW_BREAKPOINT=y
-CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y
 <at>  <at>  -211,0 +205  <at>  <at> 
+# CONFIG_HW_BREAKPOINTS is not set

Responding to the concerns raised with the previous version of the patch:

- This version accurately measures and documents the size difference
  specifically attributable to disabling these configuration options, without
  including anything that could already be disabled either way.  Also, I
  gathered the more relevant data from allnoconfig, rather than from defconfig,
  since a configuration disabling these options is almost certainly closer to a
  minimal configuration rather than a defconfig.

- This version marks the new CONFIG_HW_BREAKPOINTS option as EXPERT, to ensure
  that only people prepared to deal with the ABI implications will disable it.
  This should address the concerns raised about potentially breaking
  applications or ABI; the kernel already has numerous other options to disable
  syscalls and other userspace interfaces, but they're generally hidden behind
  EXPERT, and now this option is as well.

- It might be nice in the future to support configurations with
  CONFIG_HW_BREAKPOINTS=y and !CONFIG_PERF_EVENTS.  However, considering that
  the kernel currently doesn't support *either* !CONFIG_HW_BREAKPOINTS or
  !CONFIG_PERF_EVENTS, this seems like an improvement, and it provides a major
  reduction in kernel size.  For the embedded use case, I'd like to disable
  both.  Future patches could refactor perf to provide a subset of
  infrastructure usable to enable CONFIG_HW_BREAKPOINTS, or otherwise allow
  even more flexible configurations.

Andi Kleen (6):
  perf, x86, amd: Move __get_ibs_caps into common amd CPU file
  perf, x86: Make perf amd ibs code depend on PERF_EVENTS and SUP_AMD
  x86, ptrace: Ifdef HW_BREAKPOINTS code in ptrace
  trace: Make UPROBES depend on PERF_EVENTS
  x86, kgdb: Support compiling without hardware break points
  x86: Allow disabling HW_BREAKPOINTS, PERF_EVENTS, INSTRUCTION_DECODER, IRQ_WORK

Josh Triplett (1):
  x86: Stop selecting ANON_INODES

 arch/x86/Kconfig                         | 13 +++++++++----
 arch/x86/include/asm/perf_event.h        |  2 ++
 arch/x86/kernel/Makefile                 |  3 ++-
 arch/x86/kernel/cpu/Makefile             |  5 ++++-
 arch/x86/kernel/cpu/amd.c                | 27 +++++++++++++++++++++++++++
 arch/x86/kernel/cpu/perf_event_amd_ibs.c | 23 -----------------------
 arch/x86/kernel/kgdb.c                   | 12 ++++++++++++
 arch/x86/kernel/ptrace.c                 | 30 ++++++++++++++++++++++++++++++
 arch/x86/kvm/Kconfig                     |  1 +
 arch/x86/oprofile/op_model_amd.c         |  4 +++-
 kernel/trace/Kconfig                     |  1 +
 11 files changed, 91 insertions(+), 30 deletions(-)

--

-- 
1.9.0

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
Maynard Johnson | 5 Mar 18:56 2014
Picon

[PATCH] Remove opreport warning for /no-vmlinux and [vdso] not found

Remove opreport warning for /no-vmlinux and [vdso] not found

When running opreport -l, the following warning messages may appear:

warning: /no-vmlinux could not be found.
warning: [vdso] (tgid:31882 range:0x7fff249ae000-0x7fff249aefff) could not be found.

For the '/no-vmlinux' case, it's not a real file -- it's just a bucket
we use to assign kernel samples to.  For the '[vdso]' case, this reflects
samples in the vDSO (virtual dynamic shared object), which is a small shared
library that the kernel automatically maps into the address space of all
user-space applications.

The warnings are annoying and unnecessary, so they are removed via this
patch. This patch also adds a description of "no-vmlinux" to the operf man
page.  And for '[vdso]', users can easily google for a description.

Signed-off-by: Maynard Johnson <maynardj <at> us.ibm.com>
---
 doc/operf.1.in         |    8 +++++++-
 libpp/image_errors.cpp |    4 +++-
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/doc/operf.1.in b/doc/operf.1.in
index 382a3cc..72a46ed 100644
--- a/doc/operf.1.in
+++ b/doc/operf.1.in
 <at>  <at>  -87,7 +87,7  <at>  <at>  directory should be /root or a subdirectory of /root to avoid
 storing sample data files in locations accessible by regular users.
 .br
 .TP
-.BI "--vmlinux / k " vmlinux_path
+.BI "--vmlinux / -k " vmlinux_path
 .RS
 A vmlinux file that matches the running kernel that has symbol and/or debuginfo.
 Kernel samples will be attributed to this binary, allowing post-processing tools
 <at>  <at>  -96,6 +96,12  <at>  <at>  Kernel samples will be attributed to this binary, allowing post-processing tools
 The kernel symbol information may be obtained from /proc/kallsyms if
 the user does not specify a vmlinux file.  The symbol addresses are given
 in /proc/kallsyms if permitted by the setting of /proc/sys/kernel/kptr_restrict.
+.P
+If the
+.I --vmlinux
+option is not used and kernel symbols cannot be obtained from /proc/kallsyms,
+then all kernel samples are attributed to "no-vmlinux", which is simply
+a bucket to hold the samples and not an actual file.
 .RE
 .TP
 .BI "--events / -e " event1[,event2[,...]]
diff --git a/libpp/image_errors.cpp b/libpp/image_errors.cpp
index 09d211e..bcb1724 100644
--- a/libpp/image_errors.cpp
+++ b/libpp/image_errors.cpp
 <at>  <at>  -38,8 +38,10  <at>  <at>  void report_image_error(string const & image, image_error error, bool fatal,
 		reported_images_error.insert(image_name);

 		// FIXME: hacky
-		if (error == image_not_found && is_prefix(image, "anon "))
+		if (error == image_not_found && (is_prefix(image, "anon ") ||
+				image == "/no-vmlinux" || is_prefix(image, "[vdso]"))) {
 			return;
+		}

 		cerr << (fatal ? "error: " : "warning: ");
 		cerr << image_name << ' ';
--

-- 
1.7.1

------------------------------------------------------------------------------
Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce.
With Perforce, you get hassle-free workflows. Merge that actually works. 
Faster operations. Version large binaries.  Built-in WAN optimization and the
freedom to use Git, Perforce or both. Make the move to Perforce.
http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
Maynard Johnson | 27 Feb 23:15 2014
Picon

[PATCH] Fix compile errors on Ubuntu 14.04

Fix compile errors on Ubuntu 14.04

The gcc 4.8.2 on Ubuntu 14.04 complains about two different
types of issues that we've not seen older compilers complain about.
The complaints are warnings that are turned into errors, due to
our use of -Werror.  The first type of error involves fprintf:

   error: format not a string literal and no format arguments

I've found the following explanation for this change in gcc behavior:

  If -Wformat is specified, also warn about uses of format
  functions that represent possible security problems.  At present,
  this warns about calls to "printf" and "scanf" functions where
  the format string is not a string literal and there are no format
  arguments, as in "printf (foo);".  This may be a security hole if
  the format string came from untrusted input and contains %n.
  (This is currently a subset of what -Wformat-nonliteral warns
  about, but in future warnings may be added to -Wformat-security
  that are not included in -Wformat-nonliteral.)

The second type of error is for not checking the return value of fgets.

This patch fixes these two issues and resolved the compilation problems.

Signed-off-by: Maynard Johnson <maynardj <at> us.ibm.com>
---
 libpe_utils/op_pe_utils.cpp      |    3 +--
 libperf_events/operf_counter.cpp |    3 +--
 opjitconv/opjitconv.c            |    6 ++----
 3 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/libpe_utils/op_pe_utils.cpp b/libpe_utils/op_pe_utils.cpp
index 0b7482f..f6decd0 100644
--- a/libpe_utils/op_pe_utils.cpp
+++ b/libpe_utils/op_pe_utils.cpp
 <at>  <at>  -334,8 +334,7  <at>  <at>  set<int> op_pe_utils::op_get_available_cpus(int max_num_cpus)
 		goto out;
 	}
 	memset(cpus_online, 0, sizeof(cpus_online));
-	fgets(cpus_online, sizeof(cpus_online), online_cpus);
-	if (!cpus_online[0]) {
+	if (fgets(cpus_online, sizeof(cpus_online), online_cpus) == NULL) {
 		fclose(online_cpus);
 		err_msg = "Internal Error: Number of online cpus cannot be determined.";
 		rc = -1;
diff --git a/libperf_events/operf_counter.cpp b/libperf_events/operf_counter.cpp
index 52c4460..dd738aa 100644
--- a/libperf_events/operf_counter.cpp
+++ b/libperf_events/operf_counter.cpp
 <at>  <at>  -618,8 +618,7  <at>  <at>  void operf_record::setup()
 		goto error;
 	}
 	memset(cpus_online, 0, sizeof(cpus_online));
-	fgets(cpus_online, sizeof(cpus_online), online_cpus);
-	if (!cpus_online[0]) {
+	if (fgets(cpus_online, sizeof(cpus_online), online_cpus) == NULL) {
 		fclose(online_cpus);
 		err_msg = "Internal Error: Number of online cpus cannot be determined.";
 		rc = -1;
diff --git a/opjitconv/opjitconv.c b/opjitconv/opjitconv.c
index 82f1d4c..07b793a 100644
--- a/opjitconv/opjitconv.c
+++ b/opjitconv/opjitconv.c
 <at>  <at>  -813,10 +813,8  <at>  <at>  static void _cleanup_jitdumps(void)

 }

-static void __print_usage(const char * extra_msg)
+static void __print_usage(void)
 {
-	if (extra_msg)
-		fprintf(stderr, extra_msg);
 	fprintf(stderr, "usage: opjitconv [--debug | --non-root | --delete-jitdumps ] --session-dir=<dir>
<starttime> <endtime>\n");
 }

 <at>  <at>  -875,7 +873,7  <at>  <at>  int main(int argc, char * const argv[])
 	non_options_idx = _process_args(argc, argv);
 	// We need the session_dir and two non-option values passed -- starttime and endtime.
 	if (!session_dir || (non_options_idx != argc - 2)) {
-		__print_usage(NULL);
+		__print_usage();
 		fflush(stdout);
 		rc = EXIT_FAILURE;
 		goto out;
--

-- 
1.7.1

------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
William Cohen | 21 Feb 16:51 2014
Picon

Running oprofile on s390?

Hi,

Is operf expected to work on the s390/z series machines?  If so, what kernel version (or patch) is need?

-Will

------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
Carl E. Love | 14 Feb 23:38 2014
Picon

[PATCH] OProfile, testsuite fix for kallsyms test

Maynard:

Here is a fix to only run the kallsyms test if the oprofile version
is at least 1.0.  This should have been added when the test was
originally added to the testsuite.

               Carl Love

------------------------------------------------------------------------------------
OProfile, testsuite fix for kallsyms test

Kallsyms support was added in version 1.0.  The kallsyms test is not
valid on earlier versions of oprofile.  This patch ensures the test
oprofile-kallsyms-readable_run_tests only runs on oprofile versions
1.0 and higher

Signed-off-by: Carl Love  <carll <at> us.ibm.com>
---
 testsuite/oprofile-operf/oprofile-operf-run.exp |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/testsuite/oprofile-operf/oprofile-operf-run.exp b/testsuite/oprofile-operf/oprofile-operf-run.exp
index 1b7a4c5..63b0b1d 100644
--- a/testsuite/oprofile-operf/oprofile-operf-run.exp
+++ b/testsuite/oprofile-operf/oprofile-operf-run.exp
 <at>  <at>  -133,6 +133,15  <at>  <at>  if {$user_is_root == 0} {

 	oprofile-operf_run_tests
 	oprofile-callgraph_run_tests
-	oprofile-kallsyms-readable_run_tests
+	
+	case $operf_version {
+	    { 0.* } {
+		# no pre 1.0 specific tests to run
+	    }
+	    { * } {
+		# kallsyms support was added in version 1.0.
+		oprofile-kallsyms-readable_run_tests
+	    }
+	}
     }
 }
--

-- 
1.7.1

------------------------------------------------------------------------------
Android apps run on BlackBerry 10
Introducing the new BlackBerry 10.2.1 Runtime for Android apps.
Now with support for Jelly Bean, Bluetooth, Mapview and more.
Get your Android app in front of a whole new audience.  Start now.
http://pubads.g.doubleclick.net/gampad/clk?id=124407151&iu=/4140/ostg.clktrk

Gmane