1. 01 2月, 2014 5 次提交
  2. 27 1月, 2014 1 次提交
  3. 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
  4. 21 1月, 2014 6 次提交
  5. 17 1月, 2014 6 次提交
  6. 16 1月, 2014 5 次提交
  7. 15 1月, 2014 1 次提交
  8. 14 1月, 2014 1 次提交
    • A
      perf probe: Fix build when DWARF support libraries not present · 1d027ee9
      Arnaldo Carvalho de Melo 提交于
      On a freshly installed system, after libelf-dev is installed we get:
      
          CC       /tmp/build/perf/util/probe-event.o
        util/probe-event.c: In function ‘try_to_find_probe_trace_events’:
        util/probe-event.c:753:46: error: unused parameter ‘target’ [-Werror=unused-parameter]
             int max_tevs __maybe_unused, const char *target)
                                                      ^
          CC       /tmp/build/perf/util/cgroup.o
        util/probe-event.c: At top level:
        util/probe-event.c:193:12: error: ‘get_text_start_address’ defined but not used [-Werror=unused-function]
         static int get_text_start_address(const char *exec, unsigned long *address)
                  ^
        cc1: all warnings being treated as errors
        make[1]: *** [/tmp/build/perf/util/probe-event.o] Error 1
        make[1]: *** Waiting for unfinished jobs....
        make: *** [install] Error 2
      
      Fix it by enclosing functions only used when those libraries are installed
      under the suitable preprocessor define and using __maybe_unused to a function
      that is only built when DWARF support is disabled.
      
      Problem introduced in this changeset:
      
        commit fb7345bb
        Author: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
        Date:   Thu Dec 26 05:41:53 2013 +0000
      
            perf probe: Support basic dwarf-based operations on uprobe events
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.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-73kc2fopt81517hrdgdra18o@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1d027ee9
  9. 13 1月, 2014 14 次提交