1. 10 8月, 2021 5 次提交
  2. 09 8月, 2021 6 次提交
  3. 04 8月, 2021 5 次提交
  4. 02 8月, 2021 24 次提交
    • N
      perf tools: Add pipe_test.sh to verify pipe operations · ec02f2b1
      Namhyung Kim 提交于
      It builds a test program and use it to verify pipe behavior with perf
      record, inject and report.
      
        $ perf test pipe -v
        80: perf pipe recording and injection test                          :
        --- start ---
        test child forked, pid 1109301
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.000 MB - ]
           1109315  1109315       -1 |test.file.MGNff
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.000 MB - ]
            99.99%  test.file.MGNff  test.file.MGNffM  [.] noploop
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.000 MB - ]
            99.99%  test.file.MGNff  test.file.MGNffM  [.] noploop
        [ perf record: Woken up 1 times to write data ]
        [ perf record: Captured and wrote 0.153 MB /tmp/perf.data.dmsnlx (3995 samples) ]
            99.99%  test.file.MGNff  test.file.MGNffM  [.] noploop
        test child finished with 0
        ---- end ----
        perf pipe recording and injection test: Ok
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Acked-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210719223153.1618812-6-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ec02f2b1
    • N
      perf inject: Fix output from a file to a pipe · c3a057dc
      Namhyung Kim 提交于
      When the input is a regular file but the output is a pipe, it should
      write a pipe header.  But just repiping would write a portion of the
      existing header which is different in 'size' value.  So we need to
      prevent it and write a new pipe header along with other information
      like event attributes and features.
      
      This can handle something like this:
      
        # perf record -a -B sleep 1
      
        # perf inject -b -i perf.data | perf report -i -
      
      Factor out perf_event__synthesize_for_pipe() to be shared between perf
      record and inject.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Acked-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210719223153.1618812-5-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c3a057dc
    • N
      perf inject: Fix output from a pipe to a file · fea20d66
      Namhyung Kim 提交于
      Sometimes it needs to save the perf inject data to a file for debugging.
      But normally it assumes the same format for input and output, so the end
      result cannot be used due to a broken format.
      
        # perf record -a -o - sleep 1 | perf inject -b -o my.data
      
        # perf report -i my.data --stdio
        0x208 [0]: failed to process type: 0 [Invalid argument]
        Error:
        failed to process sample
        # To display the perf.data header info, please use --header/--header-only options.
        #
      
      In this case, it thought the data has a regular file header since the
      output is not a pipe.  But actually it doesn't have one and has a pipe
      file header.  At the end of the session, it tries to rewrite the regular
      file header with updated features and it overwrites the data just
      follows the pipe header.
      
      Fix it by checking either the input and the output is a pipe.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Acked-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210719223153.1618812-4-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      fea20d66
    • N
      perf tools: Pass a fd to perf_file_header__read_pipe() · 0ae03893
      Namhyung Kim 提交于
      Currently it unconditionally writes to stdout for repipe.  But perf
      inject can direct its output to a regular file.  Then it needs to
      write the header to the file as well.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Acked-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210719223153.1618812-3-namhyung@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      0ae03893
    • N
      perf tools: Remove repipe argument from perf_session__new() · 2681bd85
      Namhyung Kim 提交于
      The repipe argument is only used by perf inject and the all others
      passes 'false'.  Let's remove it from the function signature and add
      __perf_session__new() to be called from perf inject directly.
      
      This is a preparation of the change the pipe input/output.
      Signed-off-by: NNamhyung Kim <namhyung@kernel.org>
      Acked-by: NJiri Olsa <jolsa@redhat.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210719223153.1618812-2-namhyung@kernel.org
      [ Fixed up some trivial conflicts as this patchset fell thru the cracks ;-( ]
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      2681bd85
    • E
      perf test: Handle fd gaps in test__dso_data_reopen · 88056929
      Eirik Fuller 提交于
      https://github.com/beaker-project/restraint/issues/215 describes a file
      descriptor leak which revealed the test failure described here.
      
      The 'DSO data reopen' perf test assumes that RLIMIT_NOFILE limits the
      number of open file descriptors, but it actually limits newly opened
      file descriptors. When the file descriptor limit is reduced, file
      descriptors already open remain open regardless of the new limit. This
      test failure does not occur if open file descriptors are contiguous,
      beginning at zero.
      
      The following command triggers this perf test failure.
      
      perf test 'DSO data reopen' 3>/dev/null 8>/dev/null
      
      This patch determines the file descriptor limit by opening four files
      and then closing them. The limit is set to the fourth file descriptor,
      leaving only the first three available because any newly opened file
      descriptor must be less than the limit.
      Signed-off-by: NEirik Fuller <efuller@redhat.com>
      Acked-by: NJiri Olsa <jolsa@redhat.com>
      Acked-by: NMichael Petlan <mpetlan@redhat.com>
      LPU-Reference: 20210626023825.1398547-1-efuller@redhat.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      88056929
    • J
      perf vendor events intel: Add basic metrics for Elkhartlake · 43c117d8
      Jin Yao 提交于
      Add JSON metrics for Elkhartlake to perf.
      Signed-off-by: NJin Yao <yao.jin@linux.intel.com>
      Reviewed-by: NAndi Kleen <ak@linux.intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210802053440.21035-3-yao.jin@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      43c117d8
    • J
      perf vendor events intel: Add core event list for Elkhartlake · aa1bd892
      Jin Yao 提交于
      Add JSON core events for Elkhartlake to perf.
      
      Based on JSON list v1.02:
      
      https://download.01.org/perfmon/EHL/Signed-off-by: NJin Yao <yao.jin@linux.intel.com>
      Reviewed-by: NAndi Kleen <ak@linux.intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210802053440.21035-2-yao.jin@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      aa1bd892
    • J
      perf vendor events: Add metrics for Tigerlake · b9efd75b
      Jin Yao 提交于
      Add JSON metrics for Tigerlake to perf.
      
      Based on TMA metrics 4.21 at 01.org.
      https://download.01.org/perfmon/Reviewed-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NJin Yao <yao.jin@linux.intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210719070058.4159-2-yao.jin@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b9efd75b
    • J
      perf vendor events intel: Add core event list for Tigerlake · 4babba55
      Jin Yao 提交于
      Add JSON core events for Tigerlake to perf.
      
      Based on JSON list v1.03:
      
      https://download.01.org/perfmon/TGL/Reviewed-by: NAndi Kleen <ak@linux.intel.com>
      Signed-off-by: NJin Yao <yao.jin@linux.intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210719070058.4159-1-yao.jin@linux.intel.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4babba55
    • L
      perf annotate: Add error log in symbol__annotate() · c4db54be
      Li Huafei 提交于
      When users use 'perf annotate' on unsupported machines, error logs
      should be printed for user feedback.
      Signed-off-by: NLi Huafei <lihuafei1@huawei.com>
      Reviewed-by: NJames Clark <james.clark@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Dengcheng Zhu <dzhu@wavecomp.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Martin Liška <mliska@suse.cz>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Zhang Jinhao <zhangjinhao2@huawei.com>
      Link: http://lore.kernel.org/lkml/20210726123854.13463-2-lihuafei1@huawei.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c4db54be
    • L
      perf env: Normalize aarch64.* and arm64.* to arm64 in normalize_arch() · 4502da0e
      Li Huafei 提交于
      On my aarch64 big endian machine, the perf annotate does not work.
      
       # perf annotate
        Percent |      Source code & Disassembly of [kernel.kallsyms] for cycles (253 samples, percent: local period)
       --------------------------------------------------------------------------------------------------------------
        Percent |      Source code & Disassembly of [kernel.kallsyms] for cycles (1 samples, percent: local period)
       ------------------------------------------------------------------------------------------------------------
        Percent |      Source code & Disassembly of [kernel.kallsyms] for cycles (47 samples, percent: local period)
       -------------------------------------------------------------------------------------------------------------
       ...
      
      This is because the arch_find() function uses the normalized architecture
      name provided by normalize_arch(), and my machine's architecture name
      aarch64_be is not normalized to arm64.  Like other architectures such as
      arm and powerpc, we can fuzzy match the architecture names associated with
      aarch64.* and normalize them.
      
      It seems that there is also arm64_be architecture name, which we also
      normalize to arm64.
      Signed-off-by: NLi Huafei <lihuafei1@huawei.com>
      Reviewed-by: NJames Clark <james.clark@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Dengcheng Zhu <dzhu@wavecomp.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jin Yao <yao.jin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Martin Liška <mliska@suse.cz>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Riccardo Mancini <rickyman7@gmail.com>
      Cc: Zhang Jinhao <zhangjinhao2@huawei.com>
      Link: http //lore.kernel.org/lkml/20210726123854.13463-1-lihuafei1@huawei.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      4502da0e
    • I
      perf beauty: Reuse the generic arch errno switch · f463ad7f
      Ian Rogers 提交于
      Previously the code would see if, for example,
      tools/perf/arch/arm/include/uapi/asm/errno.h exists and if not generate
      a "generic" switch statement using the asm-generic/errno.h.
      
      This creates multiple identical "generic" switch statements before the
      default generic switch statement for an unknown architecture.
      
      By simplifying the archlist to be only for architectures that are not
      "generic" the amount of generated code can be reduced from 14 down to 6
      functions.
      
      Remove the special case of x86, instead reverse the architecture names
      so that it comes first.
      
      Committer testing:
      
        $ tools/perf/trace/beauty/arch_errno_names.sh gcc tools > before
      
      Apply this patch and:
      
        $ tools/perf/trace/beauty/arch_errno_names.sh gcc tools > after
      
      14 arches down to 6, that are the ones with an explicit errno.h file:
      
        $ ls -1 tools/arch/*/include/uapi/asm/errno.h
        tools/arch/alpha/include/uapi/asm/errno.h
        tools/arch/mips/include/uapi/asm/errno.h
        tools/arch/parisc/include/uapi/asm/errno.h
        tools/arch/powerpc/include/uapi/asm/errno.h
        tools/arch/sparc/include/uapi/asm/errno.h
        tools/arch/x86/include/uapi/asm/errno.h
        $
      
        $ diff -u4 before after
        @@ -2099,32 +987,16 @@
         const char *arch_syscalls__strerrno(const char *arch, int err)
         {
         	if (!strcmp(arch, "x86"))
         		return errno_to_name__x86(err);
        -	if (!strcmp(arch, "alpha"))
        -		return errno_to_name__alpha(err);
        -	if (!strcmp(arch, "arc"))
        -		return errno_to_name__arc(err);
        -	if (!strcmp(arch, "arm"))
        -		return errno_to_name__arm(err);
        -	if (!strcmp(arch, "arm64"))
        -		return errno_to_name__arm64(err);
        -	if (!strcmp(arch, "csky"))
        -		return errno_to_name__csky(err);
        -	if (!strcmp(arch, "mips"))
        -		return errno_to_name__mips(err);
        -	if (!strcmp(arch, "parisc"))
        -		return errno_to_name__parisc(err);
        -	if (!strcmp(arch, "powerpc"))
        -		return errno_to_name__powerpc(err);
        -	if (!strcmp(arch, "riscv"))
        -		return errno_to_name__riscv(err);
        -	if (!strcmp(arch, "s390"))
        -		return errno_to_name__s390(err);
        -	if (!strcmp(arch, "sh"))
        -		return errno_to_name__sh(err);
         	if (!strcmp(arch, "sparc"))
         		return errno_to_name__sparc(err);
        -	if (!strcmp(arch, "xtensa"))
        -		return errno_to_name__xtensa(err);
        +	if (!strcmp(arch, "powerpc"))
        +		return errno_to_name__powerpc(err);
        +	if (!strcmp(arch, "parisc"))
        +		return errno_to_name__parisc(err);
        +	if (!strcmp(arch, "mips"))
        +		return errno_to_name__mips(err);
        +	if (!strcmp(arch, "alpha"))
        +		return errno_to_name__alpha(err);
         	return errno_to_name__generic(err);
         }
      
      The rest of the patch is the removal of the errno_to_name__generic()
      unneeded clones.
      Signed-off-by: NIan Rogers <irogers@google.com>
      Tested-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20210513060441.408507-1-irogers@google.comSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      f463ad7f
    • I
      perf doc: Reorganize ARTICLES variables. · c44fc5af
      Ian Rogers 提交于
      Place early, as they are in the git Makefile. Remove references to a
      'technical` directory that doesn't exist in perf.
      Signed-off-by: NIan Rogers <irogers@google.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https //lore.kernel.org/r/20210715013343.2286699-8-irogers@google.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      c44fc5af
    • I
      perf doc: Remove howto-index.sh related references. · 17ef1f14
      Ian Rogers 提交于
      howto-index.sh exists in git but not in perf, as such targets that
      depend upon it fail. Remove such failing targets.
      Signed-off-by: NIan Rogers <irogers@google.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https //lore.kernel.org/r/20210715013343.2286699-7-irogers@google.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      17ef1f14
    • I
      perf doc: Remove cmd-list.perl references · e30b992f
      Ian Rogers 提交于
      cmd-list.perl exists in git but not in perf. As such these targets fail
      with missing dependencies. Remove them.
      Signed-off-by: NIan Rogers <irogers@google.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https //lore.kernel.org/r/20210715013343.2286699-6-irogers@google.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      e30b992f
    • I
      perf doc: Add info pages to all target. · 361ac7b4
      Ian Rogers 提交于
      Enabled to ensure that info pages build.
      Signed-off-by: NIan Rogers <irogers@google.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https //lore.kernel.org/r/20210715013343.2286699-5-irogers@google.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      361ac7b4
    • I
      perf doc: Remove references to user-manual · 33e53610
      Ian Rogers 提交于
      Perf doesn't have a user-manual.txt, but git does and this explains why
      there are references here. Having these references breaks 'make info' as
      user-manual.info can't be created given the missing dependency. Remove
      all references to user-manual so that 'make info' can succeed.
      Signed-off-by: NIan Rogers <irogers@google.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https //lore.kernel.org/r/20210715013343.2286699-4-irogers@google.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      33e53610
    • I
      perf doc: Fix doc.dep · a81df63a
      Ian Rogers 提交于
      The doc.dep dependencies for the Makefile fail to build as
      build-docdep.perl is missing. Add this file from git.
      Signed-off-by: NIan Rogers <irogers@google.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https //lore.kernel.org/r/20210715013343.2286699-3-irogers@google.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      a81df63a
    • I
      perf doc: Fix perfman.info build · 6f6e7f06
      Ian Rogers 提交于
      Before this change 'make perfman.info' fails as cat-texi.perl is
      missing. It also fails as the makeinfo output isn't written into the
      appropriate file. Add cat-texi.perl from git. Add missing output file
      flag for makeinfo.
      Signed-off-by: NIan Rogers <irogers@google.com>
      Acked-by: NNamhyung Kim <namhyung@kernel.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Stephane Eranian <eranian@google.com>
      Link: https //lore.kernel.org/r/20210715013343.2286699-2-irogers@google.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      6f6e7f06
    • J
      perf cs-etm: Pass unformatted flag to decoder · 9182f04a
      James Clark 提交于
      The TRBE (Trace Buffer Extension) feature allows a separate trace buffer
      for each trace source, therefore the trace wouldn't need to be
      formatted. The driver was introduced in commit 3fbf7f01
      ("coresight: sink: Add TRBE driver").
      
      The formatted/unformatted mode is encoded in one of the flags of the
      AUX record. The first AUX record encountered for each event is used to
      determine the mode, and this will persist for the remaining trace that
      is either decoded or dumped.
      Reviewed-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Signed-off-by: NJames Clark <james.clark@arm.com>
      Cc: Al Grant <al.grant@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https //lore.kernel.org/r/20210721150202.32065-7-james.clark@arm.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      9182f04a
    • J
      perf cs-etm: Use existing decoder instead of resetting it · 04aaad26
      James Clark 提交于
      When dumping trace, the decoder is continually deleted and recreated to
      decode each buffer. To support both formatted and unformatted trace in
      a later commit, the decoder will be configured in advance.
      
      This commit removes the deletion of the decoder and allows the
      formatted/unformatted setting to persist.
      Reviewed-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Signed-off-by: NJames Clark <james.clark@arm.com>
      Cc: Al Grant <al.grant@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https //lore.kernel.org/r/20210721150202.32065-6-james.clark@arm.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      04aaad26
    • J
      perf cs-etm: Suppress printing when resetting decoder · b8324f49
      James Clark 提交于
      The decoder is quite noisy when being reset. In a future commit,
      dump-raw-trace will use a code path that resets the decoder rather than
      creating a new one, so printing has to be suppressed to not flood the
      output.
      Reviewed-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Signed-off-by: NJames Clark <james.clark@arm.com>
      Cc: Al Grant <al.grant@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https //lore.kernel.org/r/20210721150202.32065-5-james.clark@arm.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      b8324f49
    • J
      perf cs-etm: Only setup queues when they are modified · ca50db59
      James Clark 提交于
      Continually creating queues in cs_etm__process_event() is unnecessary.
      They only need to be created when a buffer for a new CPU or thread is
      encountered. This can be in two places, when building the queues in
      advance in cs_etm__process_auxtrace_info(), or in
      cs_etm__process_auxtrace_event() when data_queued is false and the
      index wasn't available (pipe mode).
      
      This change will allow the 'formatted' decoder setting to applied when
      iterating over aux records in a later commit.
      Reviewed-by: NMathieu Poirier <mathieu.poirier@linaro.org>
      Signed-off-by: NJames Clark <james.clark@arm.com>
      Cc: Al Grant <al.grant@arm.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Anshuman Khandual <anshuman.khandual@arm.com>
      Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
      Cc: Jiri Olsa <jolsa@redhat.com>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
      Cc: Will Deacon <will@kernel.org>
      Cc: coresight@lists.linaro.org
      Cc: linux-arm-kernel@lists.infradead.org
      Link: https //lore.kernel.org/r/20210721150202.32065-4-james.clark@arm.com
      Signed-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
      ca50db59