1. 09 Dec, 2015 7 commits
    • Masami Hiramatsu's avatar
      perf tools: Fix write_numa_topology to put cpu_map instead of free · 5191d887
      Masami Hiramatsu authored
      Fix write_numa_topology to put cpu_map instead of free because cpu_map
      is managed based on refcnt.
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20151209021135.10245.79046.stgit@localhost.localdomainSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5191d887
    • Masami Hiramatsu's avatar
      perf machine: Fix machine.vmlinux_maps to make sure to clear the old one · cc1121ab
      Masami Hiramatsu authored
      Fix machine.vmlinux_maps to make sure to clear the old one if it is
      renewal. This can leak the previous maps on the vmlinux_maps because
      those are just overwritten.
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20151209021133.10245.93730.stgit@localhost.localdomain
      [ Simplified the memset, same end result ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      cc1121ab
    • Masami Hiramatsu's avatar
      perf tools: Fix maps__fixup_overlappings to put used maps · d91130e9
      Masami Hiramatsu authored
      Since the __map_groups__insert got the given map, we don't need to keep
      it. So put the maps.
      
      Refcnt debugger shows that map_groups__fixup_overlappings() got a map
      twice but the group released it just once. This pattern usually
      indicates the leak happens in caller site.
      
        ----
        ==== [0] ====
        Unreclaimed map@0x39d3ae0
        Refcount +1 => 1 at
          ./perf(map_groups__fixup_overlappings+0x335) [0x4c1865]
          ./perf(thread__insert_map+0x30) [0x4c8e00]
          ./perf(machine__process_mmap2_event+0x106) [0x4bd876]
          ./perf() [0x4c378e]
          ./perf() [0x4c4393]
          ./perf(perf_session__process_events+0x38a) [0x4c654a]
          ./perf(cmd_record+0xe24) [0x42fc94]
          ./perf() [0x47b745]
          ./perf(main+0x617) [0x422547]
          /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f2eca2deaf5]
          ./perf() [0x4226bd]
        Refcount +1 => 2 at
          ./perf(map_groups__fixup_overlappings+0x3c5) [0x4c18f5]
          ./perf(thread__insert_map+0x30) [0x4c8e00]
          ./perf(machine__process_mmap2_event+0x106) [0x4bd876]
          ./perf() [0x4c378e]
          ./perf() [0x4c4393]
          ./perf(perf_session__process_events+0x38a) [0x4c654a]
          ./perf(cmd_record+0xe24) [0x42fc94]
          ./perf() [0x47b745]
          ./perf(main+0x617) [0x422547]
          /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f2eca2deaf5]
          ./perf() [0x4226bd]
        Refcount -1 => 1 at
          ./perf(map_groups__exit+0x92) [0x4c0962]
          ./perf(map_groups__put+0x60) [0x4c0bc0]
          ./perf(thread__put+0x90) [0x4c8a40]
          ./perf(machine__delete_threads+0x7e) [0x4bad9e]
          ./perf(perf_session__delete+0x4f) [0x4c499f]
          ./perf(cmd_record+0xb6d) [0x42f9dd]
          ./perf() [0x47b745]
          ./perf(main+0x617) [0x422547]
          /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f2eca2deaf5]
          ./perf() [0x4226bd]
        ----
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20151209021131.10245.41485.stgit@localhost.localdomainSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d91130e9
    • Masami Hiramatsu's avatar
      perf hists: Fix hists_evsel to release hists · 17577dec
      Masami Hiramatsu authored
      Since hists__init doesn't set the destructor of hists_evsel (which is an
      extended evsel structure), when hists_evsel is released, the extended
      part of the hists_evsel is not deleted (note that the hists_evsel object
      itself is freed).
      
      This fixes it to add a destructor for hists__evsel and to set it up.
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20151209021129.10245.28710.stgit@localhost.localdomainSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      17577dec
    • Masami Hiramatsu's avatar
      perf stat: Fix cmd_stat to release cpu_map · 544c2ae7
      Masami Hiramatsu authored
      Fix cmd_stat() to release cpu_map objects (aggr_map and
      cpus_aggr_map) afterwards.
      
      refcnt debugger shows that the cmd_stat initializes cpu_map
      but not puts it.
        ----
        # ./perf stat -v ls
        ....
        REFCNT: BUG: Unreclaimed objects found.
        ==== [0] ====
        Unreclaimed cpu_map@0x29339c0
        Refcount +1 => 1 at
          ./perf(cpu_map__empty_new+0x6d) [0x4e64bd]
          ./perf(cmd_stat+0x5fe) [0x43594e]
          ./perf() [0x47b785]
          ./perf(main+0x617) [0x422587]
          /lib64/libc.so.6(__libc_start_main+0xf5) [0x7f2dff420af5]
          ./perf() [0x4226fd]
        REFCNT: Total 1 objects are not reclaimed.
          "cpu_map" leaks 1 objects
        ----
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20151209021127.10245.93697.stgit@localhost.localdomain
      [ Remove NULL checks before calling the put operation, it checks it already ]
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      544c2ae7
    • Masami Hiramatsu's avatar
      perf tools: Fix map_groups__clone to put cloned map · bae32b50
      Masami Hiramatsu authored
      Fix map_groups__clone to put cloned map after inserting it to the
      map_groups.
      
      Refcnt debugger shows:
        ----
        ==== [0] ====
        Unreclaimed map: 0x2a27ee0
        Refcount +1 => 1 at
          ./perf(map_groups__clone+0x8d) [0x4bb7ed]
          ./perf(thread__fork+0xbe) [0x4c1f9e]
          ./perf(machine__process_fork_event+0x216) [0x4b79a6]
          ./perf(perf_event__synthesize_threads+0x38b) [0x48135b]
          ./perf(cmd_top+0xdc6) [0x43cb76]
          ./perf() [0x477223]
          ./perf(main+0x617) [0x422077]
          /lib64/libc.so.6(__libc_start_main+0xf0) [0x7ff806af8fe0]
          ./perf() [0x4221ed]
        Refcount +1 => 2 at
          ./perf(map_groups__clone+0x128) [0x4bb888]
          ./perf(thread__fork+0xbe) [0x4c1f9e]
          ./perf(machine__process_fork_event+0x216) [0x4b79a6]
          ./perf(perf_event__synthesize_threads+0x38b) [0x48135b]
          ./perf(cmd_top+0xdc6) [0x43cb76]
          ./perf() [0x477223]
          ./perf(main+0x617) [0x422077]
          /lib64/libc.so.6(__libc_start_main+0xf0) [0x7ff806af8fe0]
          ./perf() [0x4221ed]
        Refcount -1 => 1 at
          ./perf(map_groups__exit+0x87) [0x4ba757]
          ./perf(map_groups__put+0x68) [0x4ba9a8]
          ./perf(thread__put+0x8b) [0x4c1aeb]
          ./perf(machine__delete_threads+0x81) [0x4b48f1]
          ./perf(perf_session__delete+0x4f) [0x4be63f]
          ./perf(cmd_top+0x1094) [0x43ce44]
          ./perf() [0x477223]
          ./perf(main+0x617) [0x422077]
          /lib64/libc.so.6(__libc_start_main+0xf0) [0x7ff806af8fe0]
          ./perf() [0x4221ed]
        ----
      
      This shows map_groups__clone get the map twice and put it when
      map_groups__exit.
      Signed-off-by: default avatarMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20151209021120.10245.95388.stgit@localhost.localdomainSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bae32b50
    • Ingo Molnar's avatar
      perf tui: Change default selection background color to yellow · 8d7d377c
      Ingo Molnar authored
      Boris reported that 'perf top' is unusable on his default 'black on
      white' terminal, which uses (eye friendly) light-grey as a background
      color.
      
      The reason is that the TUI cursor for the current selection line uses
      HE_COLORSET_SELECTED, and that has a default background color of
      'lightgrey' - which is a common terminal background choice and thus
      the colors conflict.
      
      Use yellow as the background color instead: that should be an uncommon
      terminal background, yet it's still ergonomic on both black and
      white/grey terminals.
      
      [ It would be a better solution to straight out detect color
        collisions and resolve them reasonably by converting them to RGB and
        calculating color space distances, but I was unable to find
        proper documentation for SLtt_get_color_object() to recover the
        current color scheme so I gave up ... Yellow works well enough. ]
      Reported-and-Tested-by: default avatarBorislav Petkov <bp@alien8.de>
      Signed-off-by: default avatarIngo Molnar <mingo@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: David Binderman <dcb314@hotmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Link: http://lkml.kernel.org/r/20150305103213.GA23046@gmail.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8d7d377c
  2. 08 Dec, 2015 3 commits
  3. 07 Dec, 2015 19 commits
  4. 06 Dec, 2015 10 commits
  5. 04 Dec, 2015 1 commit