Bug 872109

Summary: "perf report" does not work
Product: Red Hat Enterprise Linux 6 Reporter: Konstantin Khorenko <khorenko>
Component: kernelAssignee: Jiri Olsa <jolsa>
kernel sub component: Perf QA Contact: Red Hat Kernel QE team <kernel-qe>
Status: CLOSED DUPLICATE Docs Contact:
Severity: medium    
Priority: unspecified CC: acme
Version: 6.3Flags: khorenko: needinfo-
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-19 10:57:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Konstantin Khorenko 2012-11-01 09:30:37 UTC
Description of problem:
2.6.32-279.11.1.el6 kernel contains "perf" which shows nan% for certain
perf.data files (in my case for all files i've collected).

Version-Release number of selected component (if applicable):
2.6.32-279.11.1.el6 kernel

The issue has been already fixed in mainstream, the patch fixes perf in our case as well.


http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;h=a4a03fc7ef89020baca4f19174e6a43767c6d78a


perf evsel: Fix an issue where perf report fails to show

>From a4a03fc7ef89020baca4f19174e6a43767c6d78a Mon Sep 17 00:00:00 2001
From: "Naveen N. Rao" <naveen.n.rao.ibm.com>
Date: Fri, 3 Feb 2012 22:31:13 +0530
Subject: [PATCH] perf evsel: Fix an issue where perf report fails to show the
 proper percentage

This patch fixes an issue where perf report shows nan% for certain
perf.data files. The below is from a report for a do_fork probe:

   -nan%           sshd  [kernel.kallsyms]  [k] do_fork
   -nan%    packagekitd  [kernel.kallsyms]  [k] do_fork
   -nan%    dbus-daemon  [kernel.kallsyms]  [k] do_fork
   -nan%           bash  [kernel.kallsyms]  [k] do_fork

A git bisect shows commit f3bda2c as the cause. However, looking back
through the git history, I saw commit 640c03c which seems to have
removed the required initialization for perf_sample->period. The problem
only started showing after commit f3bda2c. The below patch re-introduces
the initialization and it fixes the problem for me.

With the below patch, for the same perf.data:

  73.08%             bash  [kernel.kallsyms]  [k] do_fork
   8.97%      11-dhclient  [kernel.kallsyms]  [k] do_fork
   6.41%             sshd  [kernel.kallsyms]  [k] do_fork
   3.85%        20-chrony  [kernel.kallsyms]  [k] do_fork
   2.56%         sendmail  [kernel.kallsyms]  [k] do_fork

This patch applies over current linux-tip commit 9949284.

Problem introduced in:

$ git describe 640c03c
v2.6.37-rc3-83-g640c03c

Cc: Ananth N Mavinakayanahalli <ananth.com>
Cc: Ingo Molnar <mingo>
Cc: Robert Richter <robert.richter>
Cc: Srikar Dronamraju <srikar.ibm.com>
Cc: stable
Link: http://lkml.kernel.org/r/20120203170113.5190.25558.stgit@localhost6.localdomain6
Signed-off-by: Naveen N. Rao <naveen.n.rao.ibm.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme>

Comment 2 Jiri Olsa 2012-11-05 12:56:02 UTC
(In reply to comment #0)
> Description of problem:
> 2.6.32-279.11.1.el6 kernel contains "perf" which shows nan% for certain
> perf.data files (in my case for all files i've collected).
> 
> Version-Release number of selected component (if applicable):
> 2.6.32-279.11.1.el6 kernel
> 
> The issue has been already fixed in mainstream, the patch fixes perf in our
> case as well.
> 
> 
> http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=commit;
> h=a4a03fc7ef89020baca4f19174e6a43767c6d78a

this one got in 2.6.32-287.el6 release

Please retest with the latest RHEL6 and let me know if it's still an issue.
In case it is please specify the test case in more details

thanks

Comment 3 Konstantin Khorenko 2012-11-05 13:13:25 UTC
> this one got in 2.6.32-287.el6 release
> 
> Please retest with the latest RHEL6 and let me know if it's still an issue.
> In case it is please specify the test case in more details

According to http://rhn.redhat.com/errata/rhel-server-6-errata.html the latest released kernel is 2.6.32-279.11.1.el6.

Can you please tell me where can i get 2.6.32-287.el6 ?

Thank you.

Comment 4 RHEL Program Management 2012-12-14 08:28:16 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 5 Jiri Olsa 2013-06-19 10:57:57 UTC
fixed by RHEL6 perf tool 3.4 sync BZ 827474

*** This bug has been marked as a duplicate of bug 827474 ***