1. 06 10月, 2015 2 次提交
  2. 03 10月, 2015 2 次提交
  3. 01 10月, 2015 16 次提交
  4. 29 9月, 2015 18 次提交
  5. 25 9月, 2015 2 次提交
    • A
      perf tools: Fix copying of /proc/kcore · b5cabbcb
      Adrian Hunter 提交于
      A copy of /proc/kcore containing the kernel text can be made to the
      buildid cache. e.g.
      
      	perf buildid-cache -v -k /proc/kcore
      
      To workaround objdump limitations, a copy is also made when annotating
      against /proc/kcore.
      
      The copying process stops working from libelf about v1.62 onwards (the
      problem was found with v1.63).
      
      The cause is that a call to gelf_getphdr() in kcore__add_phdr() fails
      because additional validation has been added to gelf_getphdr().
      
      The use of gelf_getphdr() is a misguided attempt to get default
      initialization of the Gelf_Phdr structure.  That should not be
      necessary because every member of the Gelf_Phdr structure is
      subsequently assigned.  So just remove the call to gelf_getphdr().
      
      Similarly, a call to gelf_getehdr() in gelf_kcore__init() can be
      removed also.
      
      Committer notes:
      
      Note to stable@kernel.org, from Adrian in the cover letter for this
      patchkit:
      
      The "Fix copying of /proc/kcore" problem goes back to v3.13 if you think
      it is important enough for stable.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: stable@kernel.org
      Link: http://lkml.kernel.org/r/1443089122-19082-3-git-send-email-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b5cabbcb
    • A
      perf probe: Use existing routine to look for a kernel module by dso->short_name · 266fa2b2
      Arnaldo Carvalho de Melo 提交于
      We have map_groups__find_by_name() to look at the list of modules that
      are in place for a given machine, so use it instead of traversing the
      machine dso list, which also includes DSOs for userspace.
      
      When merging the user and kernel DSO lists a bug was introduced where
      'perf probe' stopped being able to add probes to modules using its short
      name:
      
        # perf probe -m usbnet --add usbnet_start_xmit
        usbnet_start_xmit is out of .text, skip it.
          Error: Failed to add events.
        #
      
      With this fix it works again:
      
        # perf probe -m usbnet --add usbnet_start_xmit
        Added new event:
          probe:usbnet_start_xmit (on usbnet_start_xmit in usbnet)
      
        You can now use it in all perf tools, such as:
      
        	perf record -e probe:usbnet_start_xmit -aR sleep 1
        #
      Reported-by: NWang Nan <wangnan0@huawei.com>
      Acked-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Fixes: 3d39ac53 ("perf machine: No need to have two DSOs lists")
      Link: http://lkml.kernel.org/r/20150924015008.GE1897@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      266fa2b2