1. 15 5月, 2018 2 次提交
  2. 11 5月, 2018 5 次提交
    • 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
    • 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
  3. 08 5月, 2018 2 次提交
  4. 07 5月, 2018 1 次提交
  5. 30 4月, 2018 2 次提交
  6. 28 4月, 2018 4 次提交
  7. 27 4月, 2018 24 次提交