1. 18 5月, 2018 7 次提交
  2. 17 5月, 2018 4 次提交
  3. 16 5月, 2018 9 次提交
    • Y
      perf bpf: Fix NULL return handling in bpf__prepare_load() · 7a36a287
      YueHaibing 提交于
      bpf_object__open()/bpf_object__open_buffer can return error pointer or
      NULL, check the return values with IS_ERR_OR_NULL() in bpf__prepare_load
      and bpf__prepare_load_buffer
      Signed-off-by: NYueHaibing <yuehaibing@huawei.com>
      Acked-by: NDaniel Borkmann <daniel@iogearbox.net>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: netdev@vger.kernel.org
      Link: https://lkml.kernel.org/n/tip-psf4xwc09n62al2cb9s33v9h@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7a36a287
    • K
      perf parse-events: Handle uncore event aliases in small groups properly · 3cdc5c2c
      Kan Liang 提交于
      Perf stat doesn't count the uncore event aliases from the same uncore
      block in a group, for example:
      
        perf stat -e '{unc_m_cas_count.all,unc_m_clockticks}' -a -I 1000
        #           time             counts unit events
             1.000447342      <not counted>      unc_m_cas_count.all
             1.000447342      <not counted>      unc_m_clockticks
             2.000740654      <not counted>      unc_m_cas_count.all
             2.000740654      <not counted>      unc_m_clockticks
      
      The output is very misleading. It gives a wrong impression that the
      uncore event doesn't work.
      
      An uncore block could be composed by several PMUs. An uncore event alias
      is a joint name which means the same event runs on all PMUs of a block.
      Perf doesn't support mixed events from different PMUs in the same group.
      It is wrong to put uncore event aliases in a big group.
      
      The right way is to split the big group into multiple small groups which
      only include the events from the same PMU.
      
      Only uncore event aliases from the same uncore block should be specially
      handled here. It doesn't make sense to mix the uncore events with other
      uncore events from different blocks or even core events in a group.
      
      With the patch:
        #           time             counts unit events
           1.001557653            140,833      unc_m_cas_count.all
           1.001557653      1,330,231,332      unc_m_clockticks
           2.002709483             85,007      unc_m_cas_count.all
           2.002709483      1,429,494,563      unc_m_clockticks
      Reported-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NKan Liang <kan.liang@linux.intel.com>
      Acked-by: NJiri Olsa <jolsa@kernel.org>
      Cc: Agustin Vega-Frias <agustinv@codeaurora.org>
      Cc: Ganapatrao Kulkarni <ganapatrao.kulkarni@cavium.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Shaokun Zhang <zhangshaokun@hisilicon.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Link: http://lkml.kernel.org/r/1525727623-19768-1-git-send-email-kan.liang@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3cdc5c2c
    • A
      perf tools: Use the "_stest" symbol to identify the kernel map when loading kcore · 56549978
      Adrian Hunter 提交于
      The first symbol is not necessarily in the kernel text.  Instead of
      using the first symbol, use the _stest symbol to identify the kernel map
      when loading kcore.
      
      This allows for the introduction of symbols to identify the x86_64 PTI
      entry trampolines.
      Signed-off-by: NAdrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Andy Lutomirski <luto@kernel.org>
      Cc: Dave Hansen <dave.hansen@linux.intel.com>
      Cc: H. Peter Anvin <hpa@zytor.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: x86@kernel.org
      Link: http://lkml.kernel.org/r/1525866228-30321-6-git-send-email-adrian.hunter@intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      56549978
    • A
      perf bpf: Add probe() helper to reduce kprobes boilerplate · d8fc764d
      Arnaldo Carvalho de Melo 提交于
      So that kprobe definitions become:
      
        int probe(function, variables)(void *ctx, int err, var1, var2, ...)
      
      The existing 5sec.c, got converted and goes from:
      
        SEC("func=hrtimer_nanosleep rqtp->tv_sec")
        int func(void *ctx, int err, long sec)
        {
        }
      
      To:
      
        int probe(hrtimer_nanosleep, rqtp->tv_sec)(void *ctx, int err, long sec)
        {
        }
      
      If we decide to add tv_nsec as well, then it becomes:
      
        $ cat tools/perf/examples/bpf/5sec.c
        #include <bpf.h>
      
        int probe(hrtimer_nanosleep, rqtp->tv_sec rqtp->tv_nsec)(void *ctx, int err, long sec, long nsec)
        {
      	  return sec == 5;
        }
      
        license(GPL);
        $
      
      And if we run it, system wide as before and run some 'sleep' with values
      for the tv_nsec field, we get:
      
        # perf trace --no-syscalls -e tools/perf/examples/bpf/5sec.c
           0.000 perf_bpf_probe:hrtimer_nanosleep:(ffffffff9811b5f0) tv_sec=5 tv_nsec=100000000
        9641.650 perf_bpf_probe:hrtimer_nanosleep:(ffffffff9811b5f0) tv_sec=5 tv_nsec=123450001
        ^C#
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-1v9r8f6ds5av0w9pcwpeknyl@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      d8fc764d
    • A
      perf bpf: Add license(NAME) helper · 1f477305
      Arnaldo Carvalho de Melo 提交于
      To further reduce boilerplate.
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-vst6hj335s0ebxzqltes3nsc@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1f477305
    • A
      perf bpf: Add kprobe example to catch 5s naps · 7542b767
      Arnaldo Carvalho de Melo 提交于
      Description:
      
      . Disable strace like syscall tracing (--no-syscalls), or try tracing
        just some (-e *sleep).
      
      . Attach a filter function to a kernel function, returning when it should
        be considered, i.e. appear on the output:
      
        $ cat tools/perf/examples/bpf/5sec.c
        #include <bpf.h>
      
        SEC("func=hrtimer_nanosleep rqtp->tv_sec")
        int func(void *ctx, int err, long sec)
        {
      	  return sec == 5;
        }
      
        char _license[] SEC("license") = "GPL";
        int _version SEC("version") = LINUX_VERSION_CODE;
        $
      
      . Run it system wide, so that any sleep of >= 5 seconds and < than 6
        seconds gets caught.
      
      . Ask for callgraphs using DWARF info, so that userspace can be unwound
      
      . While this is running, run something like "sleep 5s".
      
        # perf trace --no-syscalls -e tools/perf/examples/bpf/5sec.c/call-graph=dwarf/
           0.000 perf_bpf_probe:func:(ffffffff9811b5f0) tv_sec=5
                                             hrtimer_nanosleep ([kernel.kallsyms])
                                             __x64_sys_nanosleep ([kernel.kallsyms])
                                             do_syscall_64 ([kernel.kallsyms])
                                             entry_SYSCALL_64 ([kernel.kallsyms])
                                             __GI___nanosleep (/usr/lib64/libc-2.26.so)
                                             rpl_nanosleep (/usr/bin/sleep)
                                             xnanosleep (/usr/bin/sleep)
                                             main (/usr/bin/sleep)
                                             __libc_start_main (/usr/lib64/libc-2.26.so)
                                             _start (/usr/bin/sleep)
        ^C#
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-2nmxth2l2h09f9gy85lyexcq@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      7542b767
    • A
      perf bpf: Add bpf.h to be used in eBPF proggies · dd8e4ead
      Arnaldo Carvalho de Melo 提交于
      So, the first helper is the one shortening a variable/function section
      attribute, from, for instance:
      
        char _license[] __attribute__((section("license"), used)) = "GPL";
      
      to:
      
        char _license[] SEC("license") = "GPL";
      
      Convert empty.c to that and it becomes:
      
        # cat ~acme/lib/examples/perf/bpf/empty.c
        #include <bpf.h>
      
        char _license[] SEC("license") = "GPL";
        int _version SEC("version") = LINUX_VERSION_CODE;
        #
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-zmeg52dlvy51rdlhyumfl5yf@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      dd8e4ead
    • A
      perf bpf: Add 'examples' directories · 8f12a2ff
      Arnaldo Carvalho de Melo 提交于
      The first one is the bare minimum that bpf infrastructure accepts before
      it expects actual events to be set up:
      
        $ cat tools/perf/examples/bpf/empty.c
        char _license[] __attribute__((section("license"), used)) = "GPL";
        int _version __attribute__((section("version"), used)) = LINUX_VERSION_CODE;
        $
      
      If you remove that "version" line, then it will be refused with:
      
        # perf trace -e tools/perf/examples/bpf/empty.c
        event syntax error: 'tools/perf/examples/bpf/empty.c'
                             \___ Failed to load tools/perf/examples/bpf/empty.c from source: 'version' section incorrect or lost
      
        (add -v to see detail)
        Run 'perf list' for a list of valid events
      
         Usage: perf trace [<options>] [<command>]
            or: perf trace [<options>] -- <command> [<options>]
            or: perf trace record [<options>] [<command>]
            or: perf trace record [<options>] -- <command> [<options>]
      
            -e, --event <event>   event/syscall selector. use 'perf list' to list available events
        #
      
      The next ones will, step by step, show simple filters, then the needs
      for headers will be made clear, it will be put in place and tested with
      new examples, rinse, repeat.
      
      Back to using this first one to test the perf+bpf infrastructure:
      
      If we run it will fail, as no functions are present connecting with,
      say, a tracepoint or a function using the kprobes or uprobes
      infrastructure:
      
        # perf trace -e tools/perf/examples/bpf/empty.c
        WARNING: event parser found nothing
        invalid or unsupported event: 'tools/perf/examples/bpf/empty.c'
        Run 'perf list' for a list of valid events
      
         Usage: perf trace [<options>] [<command>]
            or: perf trace [<options>] -- <command> [<options>]
            or: perf trace record [<options>] [<command>]
            or: perf trace record [<options>] -- <command> [<options>]
      
            -e, --event <event>   event/syscall selector. use 'perf list' to list available events
        #
      
      But, if we set things up to dump the generated object file to a file,
      and do this after having run 'make install', still on the developer's
      $HOME directory:
      
        # cat ~/.perfconfig
        [llvm]
      
      	dump-obj = true
        #
        # perf trace -e ~acme/lib/examples/perf/bpf/empty.c
        LLVM: dumping /home/acme/lib/examples/perf/bpf/empty.o
        WARNING: event parser found nothing
        invalid or unsupported event: '/home/acme/lib/examples/perf/bpf/empty.c'
        <SNIP>
        #
      
      We can look at the dumped object file:
      
        # ls -la ~acme/lib/examples/perf/bpf/empty.o
        -rw-r--r--. 1 root root 576 May  4 12:10 /home/acme/lib/examples/perf/bpf/empty.o
        # file ~acme/lib/examples/perf/bpf/empty.o
        /home/acme/lib/examples/perf/bpf/empty.o: ELF 64-bit LSB relocatable, *unknown arch 0xf7* version 1 (SYSV), not stripped
        # readelf -sw ~acme/lib/examples/perf/bpf/empty.o
      
        Symbol table '.symtab' contains 3 entries:
           Num:    Value          Size Type    Bind   Vis      Ndx Name
             0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND
             1: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT    3 _license
             2: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT    4 _version
        #
        # tools/bpf/bpftool/bpftool --pretty ~acme/lib/examples/perf/bpf/empty.o
        null
        #
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-y7dkhakejz3013o0w21n98xd@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      8f12a2ff
    • A
      perf llvm-utils: Add bpf include path to clang command line · 1b16fffa
      Arnaldo Carvalho de Melo 提交于
      We'll start putting headers for helpers to be used in eBPF proggies in
      there:
      
        # perf trace -v --no-syscalls -e empty.c |& grep "llvm compiling command : "
        llvm compiling command : /usr/lib64/ccache/clang -D__KERNEL__ -D__NR_CPUS__=4 -DLINUX_VERSION_CODE=0x41100   -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/7/include -I/home/acme/git/linux/arch/x86/include -I./arch/x86/include/generated  -I/home/acme/git/linux/include -I./include -I/home/acme/git/linux/arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I/home/acme/git/linux/include/uapi -I./include/generated/uapi -include /home/acme/git/linux/include/linux/kconfig.h  -I/home/acme/lib/include/perf/bpf -Wno-unused-value -Wno-pointer-sign -working-directory /lib/modules/4.17.0-rc3-00034-gf4ef6a43/build -c /home/acme/bpf/empty.c -target bpf -O2 -o -
        #
      
      Notice the "-I/home/acme/lib/include/perf/bpf"
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-6xq94xro8xlb5s9urznh3f9k@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      1b16fffa
  4. 15 5月, 2018 2 次提交
  5. 11 5月, 2018 6 次提交
    • A
      perf tools: Add missing newline when parsing empty BPF proggie · c23080a6
      Arnaldo Carvalho de Melo 提交于
      This is not specific to BPF but was found when parsing a .c BPF proggie
      that while valid, had no events attached to tracepoints, kprobes, etc:
      
      Very minimal file that perf's BPF code can compile:
      
        # cat empty.c
        char _license[] __attribute__((section("license"), used)) = "GPL";
        int _version __attribute__((section("version"), used)) = LINUX_VERSION_CODE;
        #
      
      Before this patch:
      
        # perf trace -e empty.c
        WARNING: event parser found nothinginvalid or unsupported event: 'empty.c'
        Run 'perf list' for a list of valid events
      
         Usage: perf trace [<options>] [<command>]
            or: perf trace [<options>] -- <command> [<options>]
            or: perf trace record [<options>] [<command>]
            or: perf trace record [<options>] -- <command> [<options>]
      
            -e, --event <event>   event/syscall selector. use 'perf list' to list available events
          #
      
      After:
      
        # perf trace -e empty.c
        WARNING: event parser found nothing
        invalid or unsupported event: 'empty.c'
        Run 'perf list' for a list of valid events
      
         Usage: perf trace [<options>] [<command>]
            or: perf trace [<options>] -- <command> [<options>]
            or: perf trace record [<options>] [<command>]
            or: perf trace record [<options>] -- <command> [<options>]
      
            -e, --event <event>   event/syscall selector. use 'perf list' to list available events
        #
      
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: David Ahern <dsahern@gmail.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Wang Nan <wangnan0@huawei.com>
      Link: https://lkml.kernel.org/n/tip-8ysughiz00h6mjpcot04qyjj@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c23080a6
    • L
      perf cs-etm: Remove redundant space · 3a088799
      Leo Yan 提交于
      There have two spaces ahead function name cs_etm__set_pid_tid_cpu(), so
      remove one space and correct indentation.
      Signed-off-by: NLeo Yan <leo.yan@linaro.org>
      Acked-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lkml.kernel.org/r/1525924920-4381-2-git-send-email-leo.yan@linaro.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      3a088799
    • L
      perf cs-etm: Support unknown_thread in cs_etm_auxtrace · 46d53620
      Leo Yan 提交于
      CoreSight doesn't allocate thread structure for unknown_thread in ETM
      auxtrace, so unknown_thread is NULL pointer.  If the perf data doesn't
      contain valid tid and then cs_etm__mem_access() uses unknown_thread
      instead as thread handler, this results in a segmentation fault when
      thread__find_addr_map() accesses the thread handler.
      
      This commit creates a new thread data which is used by unknown_thread, so
      CoreSight tracing can roll back to use unknown_thread if perf data
      doesn't include valid thread info.  This commit also releases thread
      data for initialization failure case and for normal auxtrace free flow.
      Signed-off-by: NLeo Yan <leo.yan@linaro.org>
      Acked-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: linux-arm-kernel@lists.infradead.org
      Link: http://lkml.kernel.org/r/1525924920-4381-1-git-send-email-leo.yan@linaro.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      46d53620
    • D
      tc-testing: fix tdc tests for 'bpf' action · f7017caf
      Davide Caratti 提交于
      - correct a typo in the value of 'matchPattern' of test 282d, potentially
       causing false negative
      - allow errors when 'teardown' executes '$TC action flush action bpf' in
       test 282d, to fix false positive when it is run with act_bpf unloaded
      - correct the value of 'matchPattern' in test e939, causing false positive
       in case the BPF JIT is enabled
      
      Fixes: 440ea4ae ("tc-testing: add selftests for 'bpf' action")
      Signed-off-by: NDavide Caratti <dcaratti@redhat.com>
      Acked-by: NLucas Bates <lucasb@mojatatu.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f7017caf
    • J
      perf annotate: Display all available events on --stdio · 04d2600a
      Jin Yao 提交于
      When we perform the following command lines:
      
        $ perf record -e "{cycles,branches}" ./div
        $ perf annotate main --stdio
      
      The output shows only the first event, "cycles" and the displaying
      format is not correct.
      
         Percent         |      Source code & Disassembly of div for cycles (44550 samples)
        -----------------------------------------------------------------------------------
                         :
                         :
                         :
                         :            Disassembly of section .text:
                         :
                         :            00000000004004b0 <main>:
                         :            main():
                         :
                         :                    return i;
                         :            }
                         :
                         :            int main(void)
                         :            {
            0.00 :   4004b0:       push   %rbx
                         :                    int i;
                         :                    int flag;
                         :                    volatile double x = 1212121212, y = 121212;
                         :
                         :                    s_randseed = time(0);
            0.00 :   4004b1:       xor    %edi,%edi
                         :                    srand(s_randseed);
            0.00 :   4004b3:       mov    $0x77359400,%ebx
                         :
                         :                    return i;
                         :            }
      
      The issue is that the value of the 'nr_percent' variable is hardcoded to
      1.  This patch fixes it.
      
      With this patch, the output is:
      
         Percent         |      Source code & Disassembly of div for cycles (44550 samples)
        -----------------------------------------------------------------------------------
                         :
                         :
                         :
                         :            Disassembly of section .text:
                         :
                         :            00000000004004b0 <main>:
                         :            main():
                         :
                         :                    return i;
                         :            }
                         :
                         :            int main(void)
                         :            {
            0.00    0.00 :   4004b0:       push   %rbx
                         :                    int i;
                         :                    int flag;
                         :                    volatile double x = 1212121212, y = 121212;
                         :
                         :                    s_randseed = time(0);
            0.00    0.00 :   4004b1:       xor    %edi,%edi
                         :                    srand(s_randseed);
            0.00    0.00 :   4004b3:       mov    $0x77359400,%ebx
                         :
                         :                    return i;
                         :            }
      Signed-off-by: NJin Yao <yao.jin@linux.intel.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Fixes: f681d593 ("perf annotate: Remove disasm__calc_percent() from disasm_line__print()")
      Link: http://lkml.kernel.org/r/1525881435-4092-1-git-send-email-yao.jin@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      04d2600a
    • T
      perf test: "probe libc's inet_pton" fails on s390 due to missing inline · f8207b98
      Thomas Richter 提交于
      perf test "probe libc's inet_pton & backtrace it with ping" fails on
      4.17.0rc3 on s/390. It turned out that function __inet_pton is reported
      as inline:
      
        [root@s8360047 perf]# ./perf script -i /tmp/perf.data.111
        ping 12457 [000]  1584.478959: probe_libc:inet_pton: (3ffb5a347e8)
                          1347e8 __inet_pton (inlined)
                           f19d7 gaih_inet.constprop.5 (/usr/lib64/libc-2.24.so)
                           f4c3f __GI_getaddrinfo (inlined)
                            410b main (/usr/bin/ping)
      
      Allow __inet_pton listed as inline.
      Signed-off-by: NThomas Richter <tmricht@linux.ibm.com>
      Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
      Cc: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
      Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
      Link: http://lkml.kernel.org/r/20180503065837.71043-1-tmricht@linux.ibm.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f8207b98
  6. 08 5月, 2018 6 次提交
  7. 07 5月, 2018 1 次提交
  8. 04 5月, 2018 1 次提交
    • J
      tools: power/acpi, revert to LD = gcc · 75539616
      Jiri Slaby 提交于
      Commit 7ed1c190 (tools: fix cross-compile var clobbering) removed
      setting of LD to $(CROSS_COMPILE)gcc. This broke build of acpica
      (acpidump) in power/acpi:
       ld: unrecognized option '-D_LINUX'
      
      The tools pass CFLAGS to the linker (incl. -D_LINUX), so revert this
      particular change and let LD be $(CC) again. Note that the old behaviour
      was a bit different, it used $(CROSS_COMPILE)gcc which was eliminated by
      the commit 7ed1c190. We use $(CC) for that reason.
      
      Fixes: 7ed1c190 (tools: fix cross-compile var clobbering)
      Signed-off-by: NJiri Slaby <jslaby@suse.cz>
      Cc: 4.16+ <stable@vger.kernel.org> # 4.16+
      Signed-off-by: NRafael J. Wysocki <rafael.j.wysocki@intel.com>
      75539616
  9. 02 5月, 2018 1 次提交
  10. 30 4月, 2018 2 次提交
  11. 28 4月, 2018 1 次提交
    • M
      selftests: Fix lib.mk run_tests target shell script · a3355440
      Mathieu Desnoyers 提交于
      Within run_tests target, the whole script needs to be executed within
      the same shell and not as separate subshells, so the initial test_num
      variable set to 0 is still present when executing "test_num=`echo
      $$test_num+1 | bc`;".
      
      Demonstration of the issue (make run_tests):
      
      TAP version 13
      (standard_in) 1: syntax error
      selftests: basic_test
      ========================================
      ok 1.. selftests: basic_test [PASS]
      (standard_in) 1: syntax error
      selftests: basic_percpu_ops_test
      ========================================
      ok 1.. selftests: basic_percpu_ops_test [PASS]
      (standard_in) 1: syntax error
      selftests: param_test
      ========================================
      ok 1.. selftests: param_test [PASS]
      
      With fix applied:
      
      TAP version 13
      selftests: basic_test
      ========================================
      ok 1..1 selftests: basic_test [PASS]
      selftests: basic_percpu_ops_test
      ========================================
      ok 1..2 selftests: basic_percpu_ops_test [PASS]
      selftests: param_test
      ========================================
      ok 1..3 selftests: param_test [PASS]
      Signed-off-by: NMathieu Desnoyers <mathieu.desnoyers@efficios.com>
      Fixes: 1f87c7c1 ("selftests: lib.mk: change RUN_TESTS to print messages in TAP13 format")
      CC: Shuah Khan <shuahkh@osg.samsung.com>
      CC: linux-kselftest@vger.kernel.org
      Signed-off-by: NShuah Khan (Samsung OSG) <shuah@kernel.org>
      a3355440