1. 27 11月, 2015 1 次提交
  2. 05 11月, 2015 1 次提交
    • J
      perf tools: Insert split maps correctly into origin group · cb8382e0
      Jiri Olsa 提交于
      When new maps are cloned out of split map they are added into origin
      map's group, but their groups pointer is not updated.
      
      This could lead to a segfault, because map->groups is expected to be
      always set as reported by Markus:
      
        __map__is_kernel (map=map@entry=0x1abb7a0) at util/map.c:238
        238             return __machine__kernel_map(map->groups->machine, map->type) =
        (gdb) bt
        #0  __map__is_kernel (map=map@entry=0x1abb7a0) at util/map.c:238
        #1  0x00000000004393e4 in symbol_filter (map=map@entry=0x1abb7a0, sym=sym@entry
        #2  0x00000000004fcd4d in dso__load_sym (dso=dso@entry=0x166dae0, map=map@entry
        #3  0x00000000004a64e0 in dso__load (dso=0x166dae0, map=map@entry=0x1abb7a0, fi
        #4  0x00000000004b941f in map__load (filter=0x4393c0 <symbol_filter>, map=<opti
        #5  map__find_symbol (map=0x1abb7a0, addr=40188, filter=0x4393c0 <symbol_filter
        ...
      
      Adding __map_groups__insert function to add map into groups together
      with map->groups pointer update. It takes no lock as opposed to existing
      map_groups__insert, as maps__fixup_overlappings(), where it is being
      called, already has the necessary lock held.
      
      Using __map_groups__insert to add new maps after map split.
      Reported-by: NMarkus Trippelsdorf <markus@trippelsdorf.de>
      Signed-off-by: NJiri Olsa <jolsa@kernel.org>
      Tested-by: NMarkus Trippelsdorf <markus@trippelsdorf.de>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Link: http://lkml.kernel.org/r/20151104140811.GA32664@krava.brq.redhat.com
      Fixes: cfc5acd4 ("perf top: Filter symbols based on __map__is_kernel(map)")
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      cb8382e0
  3. 01 10月, 2015 3 次提交
  4. 21 8月, 2015 1 次提交
  5. 23 7月, 2015 1 次提交
  6. 16 6月, 2015 1 次提交
  7. 08 6月, 2015 1 次提交
    • A
      perf tools: Reference count struct dso · d3a7c489
      Arnaldo Carvalho de Melo 提交于
      This has a different model than the 'thread' and 'map' struct lifetimes:
      there is not a definitive "don't use this DSO anymore" event, i.e. we may
      get many 'struct map' holding references to the '/usr/lib64/libc-2.20.so'
      DSO but then at some point some DSO may have no references but we still
      don't want to straight away release its resources, because "soon" we may
      get a new 'struct map' that needs it and we want to reuse its symtab or
      other resources.
      
      So we need some way to garbage collect it when crossing some memory
      usage threshold, which is left for anoter patch, for now it is
      sufficient to release it when calling dsos__exit(), i.e. when deleting
      the whole list as part of deleting the 'struct machine' containing it,
      which will leave only referenced objects being used.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/n/tip-majzgz07cm90t2tejrjy4clf@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d3a7c489
  8. 29 5月, 2015 3 次提交
  9. 28 5月, 2015 4 次提交
  10. 27 5月, 2015 3 次提交
  11. 16 5月, 2015 1 次提交
  12. 04 5月, 2015 1 次提交
  13. 08 4月, 2015 1 次提交
  14. 25 11月, 2014 1 次提交
  15. 29 10月, 2014 1 次提交
    • A
      perf tools: Set thread->mg.machine in all places · 11246c70
      Arnaldo Carvalho de Melo 提交于
      We were setting this only in machine__init(), i.e. for the map_groups that
      holds the kernel module maps, not for the one used for a thread's executable
      mmaps.
      
      Now we are sure that we can obtain the machine where a thread is by going
      via thread->mg->machine, thus we can, in the following patch, make all
      codepaths that receive machine _and_ thread, drop the machine one.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Don Zickus <dzickus@redhat.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jean Pihet <jean.pihet@linaro.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/n/tip-y6zgaqsvhrf04v57u15e4ybm@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      11246c70
  16. 15 10月, 2014 2 次提交
  17. 20 8月, 2014 1 次提交
  18. 24 7月, 2014 2 次提交
  19. 17 7月, 2014 2 次提交
  20. 09 6月, 2014 1 次提交
  21. 21 5月, 2014 1 次提交
  22. 28 4月, 2014 2 次提交
  23. 01 2月, 2014 1 次提交
  24. 24 1月, 2014 1 次提交
    • M
      perf symbols: Load map before using map->map_ip() · 4afc81cd
      Masami Hiramatsu 提交于
      In map_groups__find_symbol() map->map_ip is used without ensuring the
      map is loaded. Then the address passed to map->map_ip isn't mapped at
      the first time.
      
      E.g. below code always fails to get a symbol at the first call;
      
      	addr = /* Somewhere in the kernel text */
      	symbol_conf.try_vmlinux_path = true;
      	symbol__init();
      	host_machine = machine__new_host();
      	sym = machine__find_kernel_function(host_machine,
      					 addr, NULL, NULL);
      	/* Note that machine__find_kernel_function calls
      	   map_groups__find_symbol */
      
      This ensures it by calling map__load before using it in
      map_groups__find_symbol().
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: "David A. Long" <dave.long@linaro.org>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Oleg Nesterov <oleg@redhat.com>
      Cc: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
      Cc: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
      Cc: yrl.pp-manager.tt@hitachi.com
      Link: http://lkml.kernel.org/r/20140123022950.7206.17357.stgit@kbuild-fedora.yrl.intra.hitachi.co.jpSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4afc81cd
  25. 21 1月, 2014 1 次提交
  26. 10 12月, 2013 1 次提交
    • A
      perf script: Add an option to print the source line number · cc8fae1d
      Adrian Hunter 提交于
      Add field 'srcline' that displays the source file name and line number
      associated with the sample ip.  The information displayed is the same as
      from addr2line.
      
       $ perf script -f comm,tid,pid,time,ip,sym,dso,symoff,srcline
                  grep 10701/10701 2497321.421013:  ffffffff81043ffa native_write_msr_safe+0xa ([kernel.kallsyms])
        /usr/src/debug/kernel-3.9.fc17/linux-3.9.10-100.fc17.x86_64/arch/x86/include/asm/msr.h:95
                  grep 10701/10701 2497321.421984:  ffffffff8165b6b3 _raw_spin_lock+0x13 ([kernel.kallsyms])
        /usr/src/debug/kernel-3.9.fc17/linux-3.9.10-100.fc17.x86_64/arch/x86/include/asm/spinlock.h:54
                  grep 10701/10701 2497321.421990:  ffffffff810b64b3 tick_sched_timer+0x53 ([kernel.kallsyms])
        /usr/src/debug/kernel-3.9.fc17/linux-3.9.10-100.fc17.x86_64/kernel/time/tick-sched.c:840
                  grep 10701/10701 2497321.421992:  ffffffff8106f63f run_timer_softirq+0x2f ([kernel.kallsyms])
        /usr/src/debug/kernel-3.9.fc17/linux-3.9.10-100.fc17.x86_64/kernel/timer.c:1372
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mike Galbraith <efault@gmx.de>
      Cc: Namhyung Kim <namhyung@gmail.com>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Stephane Eranian <eranian@google.com>
      Link: http://lkml.kernel.org/r/1386315778-11633-3-git-send-email-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      cc8fae1d
  27. 14 10月, 2013 1 次提交