1. 14 2月, 2012 4 次提交
  2. 09 2月, 2012 1 次提交
    • S
      perf tools: fix endianness detection in perf.data · 73323f54
      Stephane Eranian 提交于
      The current version of perf detects whether or not the perf.data file is
      written in a different endianness using the attr_size field in the
      header of the file. This field represents sizeof(struct perf_event_attr)
      as known to perf record. If the sizes do not match, then perf tries the
      byte-swapped version. If they match, then the tool assumes a different
      endianness.
      
      The issue with the approach is that it assumes the size of
      perf_event_attr always has to match between perf record and perf report.
      However, the kernel perf_event ABI is extensible.  New fields can be
      added to struct perf_event_attr. Consequently, it is not possible to use
      attr_size to detect endianness.
      
      This patch takes another approach by using the magic number written at
      the beginning of the perf.data file to detect endianness. The magic
      number is an eight-byte signature.  It's primary purpose is to identify
      (signature) a perf.data file. But it could also be used to encode the
      endianness.
      
      The patch introduces a new value for this signature. The key difference
      is that the signature is written differently in the file depending on
      the endianness. Thus, by comparing the signature from the file with the
      tool's own signature it is possible to detect endianness. The new
      signature is "PERFILE2".
      
      Backward compatiblity with existing perf.data file is ensured.
      Tested-by: NDavid Ahern <dsahern@gmail.com>
      Acked-by: NDavid Ahern <dsahern@gmail.com>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com>
      Cc: Arun Sharma <asharma@fb.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Lin Ming <ming.m.lin@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Roberto Agostino Vitillo <ravitillo@lbl.gov>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Vince Weaver <vweaver1@eecs.utk.edu>
      Link: http://lkml.kernel.org/r/1328187288-24395-15-git-send-email-eranian@google.comSigned-off-by: NStephane Eranian <eranian@google.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      73323f54
  3. 07 2月, 2012 2 次提交
    • N
      perf evsel: Fix an issue where perf report fails to show the proper percentage · a4a03fc7
      Naveen N. Rao 提交于
      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 f3bda2c9 as the cause. However, looking back
      through the git history, I saw commit 640c03ce which seems to have
      removed the required initialization for perf_sample->period. The problem
      only started showing after commit f3bda2c9. 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 640c03ce
      v2.6.37-rc3-83-g640c03ce
      
      Cc: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Robert Richter <robert.richter@amd.com>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: stable@kernel.org
      Link: http://lkml.kernel.org/r/20120203170113.5190.25558.stgit@localhost6.localdomain6Signed-off-by: NNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a4a03fc7
    • J
      perf tools: Fix prefix matching for kernel maps · bf32c9eb
      Jiri Olsa 提交于
      In some perf ancient versions we used '[kernel.kallsyms._text]' as the
      name for the kernel map.
      
      This got changed with commit:
        perf: 'perf kvm' tool for monitoring guest performance from host
        commit a1645ce1
        Author: Zhang, Yanmin <yanmin_zhang@linux.intel.com>
      
      and we started to use following name '[kernel.kallsyms]_text'.
      
      This name change is important for the report code dealing with ancient
      perf data. When processing the kernel map event, we need to recognize
      the old naming (dont match the last ']') and initialize the kernel map
      correctly.
      
      The subsequent call to maps__set_kallsyms_ref_reloc_sym deals with the
      superfluous ']' to get correct symbol name.
      
      Cc: Corey Ashford <cjashfor@linux.vnet.ibm.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/1328461865-6127-1-git-send-email-jolsa@redhat.comSigned-off-by: NJiri Olsa <jolsa@redhat.com>
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      bf32c9eb
  4. 03 2月, 2012 2 次提交
  5. 02 2月, 2012 1 次提交
  6. 31 1月, 2012 7 次提交
  7. 25 1月, 2012 6 次提交
  8. 08 1月, 2012 2 次提交
  9. 07 1月, 2012 4 次提交
  10. 04 1月, 2012 1 次提交
  11. 30 12月, 2011 1 次提交
  12. 24 12月, 2011 9 次提交