1. 22 9月, 2015 5 次提交
    • A
      tools build: Allow setting the feature detection user · 13e96db6
      Arnaldo Carvalho de Melo 提交于
      We will use the tools/build/ autodetection in the eBPF patchkit
      and it is currently sharing the output directory with perf, that
      also uses the feature detection logic.
      
      As we keep state in the output directory, so that we can avoid running
      all the tests again, we need to have different filenames for the files
      used in this state, allow doing that via the FEATURE_USER variable, to
      be set alongside the existing FEATURE_{TEST,DISPLAY} variables.
      
      v2: Fix comment describing the FEATURE_DUMP filename to make sure where
          it is created, precisely at $(OUTPUT)FEATURE-DUMP$(FEATURE_USER).
          Pointed out by Jiri.
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Alexei Starovoitov <ast@plumgrid.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: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/n/tip-fdbev0vrn3x6idqc3ajbnvcb@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      13e96db6
    • A
      tools lib bpf: Fix up FEATURE_{TESTS,DISPLAY} usage · 20517cd9
      Arnaldo Carvalho de Melo 提交于
      When libbpf was introduced it wrongly asked for the "libelf" and "bpf"
      feature tests to be performed (via FEATURE_TESTS), while asking that
      "libbpf", "libelf-mmap", "libelf-getphdrnum" and "bpf" to have the
      result of its respective tests to be displayed (via FEATURE_DISPLAY).
      
      Due to another recently bug fixed in the tools/build/ infrastructure
      ("tools build: Fixup feature detection display function name") the
      results for the entries in the FEATURE_DISPLAY, for this case, were
      appearing as all succeeding, when two of them (the ones only on the
      DISPLAY) were not even being performed.
      
      Before:
      
        $ make -C tools/lib/bpf/
        make: Entering directory '/home/git/linux/tools/lib/bpf'
        Auto-detecting system features:
        ...                        libelf: [ on  ]
        ...             libelf-getphdrnum: [ OFF ]
        ...                   libelf-mmap: [ OFF ]
        ...                           bpf: [ on  ]
        <SNIP>
      
      After, with FEATURE_TESTS == FEATURE_DISPLAY:
      
        Auto-detecting system features:
        ...                        libelf: [ on  ]
        ...             libelf-getphdrnum: [ on  ]
        ...                   libelf-mmap: [ on  ]
        ...                           bpf: [ on  ]
        <SNIP>
      
      I just inverted, so that it tests the four features but displays just
      the libelf and mmap ones, to make it more compact. So it becomes:
      
        $ make -C tools/lib/bpf/
        make: Entering directory '/home/git/linux/tools/lib/bpf'
      
        Auto-detecting system features:
        ...                        libelf: [ on  ]
        ...                           bpf: [ on  ]
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Cc: pi3orama@163.com
      Fixes: 1b76c13e ("bpf tools: Introduce 'bpf' library and add bpf feature check")
      Link: http://lkml.kernel.org/n/tip-y4bd59e6j9rzzojiyeqrg2jq@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      20517cd9
    • A
      tools build: Fixup feature detection display function name · 6076e2a4
      Arnaldo Carvalho de Melo 提交于
      Cut'n'paste mistake, it should eval the name of the function
      defined right next to it, in the next line, fix it.
      
      Before:
      
        $ make -C tools/lib/bpf/
        make: Entering directory '/home/git/linux/tools/lib/bpf'
      
        Auto-detecting system features:
        ...                        libelf: [ on  ]
        ...             libelf-getphdrnum: [ on  ]
        ...                   libelf-mmap: [ on  ]
        ...                           bpf: [ on  ]
        <SNIP>
      
      After:
      
        $ make -C tools/lib/bpf/
        make: Entering directory '/home/git/linux/tools/lib/bpf'
      
        Auto-detecting system features:
        ...                        libelf: [ on  ]
        ...             libelf-getphdrnum: [ OFF ]
        ...                   libelf-mmap: [ OFF ]
        ...                           bpf: [ on  ]
        <SNIP>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: Borislav Petkov <bp@suse.de>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Frederic Weisbecker <fweisbec@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Wang Nan <wangnan0@huawei.com>
      Cc: pi3orama@163.com
      Fixes: 58d4f00f ("perf build: Fix feature_check name clash")
      Link: http://lkml.kernel.org/n/tip-dzu1c4sruukgfq5d5b1c4r30@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6076e2a4
    • W
      perf tools: Don't assume that the parser returns non empty evsel list · 854f7363
      Wang Nan 提交于
      Don't blindly retrieve and use a last element in the lists returned by
      parse_events__scanner(), as it may have collected no entries, i.e.
      return an empty list.
      Signed-off-by: NWang Nan <wangnan0@huawei.com>
      Cc: Alexei Starovoitov <ast@plumgrid.com>
      Cc: Brendan Gregg <brendan.d.gregg@gmail.com>
      Cc: Daniel Borkmann <daniel@iogearbox.net>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: He Kuang <hekuang@huawei.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kaixu Xia <xiakaixu@huawei.com>
      Cc: Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
      Cc: Zefan Li <lizefan@huawei.com>
      Cc: pi3orama@163.com
      Link: http://lkml.kernel.org/r/1441523623-152703-2-git-send-email-wangnan0@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      854f7363
    • M
      perf probe: Fix a segfault when removing uprobe events · 0fb18553
      Masami Hiramatsu 提交于
      Fix a segfault bug and a small mistake in perf probe -d.
      
      Since the "ulist" in perf_del_probe_events is never initialized,
      strlist__add(ulist, *) always causes a segfault when removing
      uprobe events by perf probe -d.
      
      Also, the "str" local variable is never released if fail to
      allocate the "klist". This fixes it too.
      
      This has been introduced by the commit e607f142 ("perf probe:
      Print deleted events in cmd_probe()").
      Reported-by: NMilian Wolff <milian.wolff@kdab.com>
      Signed-off-by: NMasami Hiramatsu <masami.hiramatsu.pt@hitachi.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Link: http://lkml.kernel.org/r/20150916125241.4446.44805.stgit@localhost.localdomainSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0fb18553
  2. 18 9月, 2015 33 次提交
  3. 17 9月, 2015 2 次提交