An error occurred fetching the project authors.
  1. 15 Jun, 2022 1 commit
  2. 13 Apr, 2022 8 commits
  3. 11 Mar, 2022 2 commits
    • Leo Yan's avatar
      coresight: etm4x: Don't trace PID for non-root PID namespace · aab47386
      Leo Yan authored
      When runs in perf mode, the driver always enables the PID tracing.  This
      can lead confusion when the profiling session runs in non-root PID
      namespace, whereas it records the PIDs from the root PID namespace.
      
      To avoid confusion for PID tracing, when runs in perf mode, this patch
      changes to only enable PID tracing for root PID namespace.
      
      As result, after apply this patch, the perf tool reports PID as '-1' for
      all samples:
      
        # unshare --fork --pid perf record -e cs_etm// -m 64K,64K -a \
      	-o perf_test.data -- uname
        # perf report -i perf_test.data --itrace=Zi1000i --stdio
      
        # Total Lost Samples: 0
        #
        # Samples: 94  of event 'instructions'
        # Event count (approx.): 94000
        #
        # Overhead  Command  Shared Object      Symbol
        # ........  .......  .................  ..............................
        #
            68.09%  :-1      [kernel.kallsyms]  [k] __sched_text_end
             3.19%  :-1      [kernel.kallsyms]  [k] hrtimer_interrupt
             2.13%  :-1      [kernel.kallsyms]  [k] __bitmap_and
             2.13%  :-1      [kernel.kallsyms]  [k] trace_vbprintk
             1.06%  :-1      [kernel.kallsyms]  [k] __fget_files
             1.06%  :-1      [kernel.kallsyms]  [k] __schedule
             1.06%  :-1      [kernel.kallsyms]  [k] __softirqentry_text_start
             1.06%  :-1      [kernel.kallsyms]  [k] __update_load_avg_cfs_rq
             1.06%  :-1      [kernel.kallsyms]  [k] __update_load_avg_se
             1.06%  :-1      [kernel.kallsyms]  [k] arch_counter_get_cntpct
             1.06%  :-1      [kernel.kallsyms]  [k] check_and_switch_context
             1.06%  :-1      [kernel.kallsyms]  [k] format_decode
             1.06%  :-1      [kernel.kallsyms]  [k] handle_percpu_devid_irq
             1.06%  :-1      [kernel.kallsyms]  [k] irq_enter_rcu
             1.06%  :-1      [kernel.kallsyms]  [k] irqtime_account_irq
             1.06%  :-1      [kernel.kallsyms]  [k] ktime_get
             1.06%  :-1      [kernel.kallsyms]  [k] ktime_get_coarse_real_ts64
             1.06%  :-1      [kernel.kallsyms]  [k] memmove
             1.06%  :-1      [kernel.kallsyms]  [k] perf_ioctl
             1.06%  :-1      [kernel.kallsyms]  [k] perf_output_begin
             1.06%  :-1      [kernel.kallsyms]  [k] perf_output_copy
             1.06%  :-1      [kernel.kallsyms]  [k] profile_tick
             1.06%  :-1      [kernel.kallsyms]  [k] sched_clock
             1.06%  :-1      [kernel.kallsyms]  [k] timerqueue_add
             1.06%  :-1      [kernel.kallsyms]  [k] trace_save_cmdline
             1.06%  :-1      [kernel.kallsyms]  [k] update_load_avg
             1.06%  :-1      [kernel.kallsyms]  [k] vbin_printf
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      Link: https://lore.kernel.org/r/20220204152403.71775-4-leo.yan@linaro.org
      aab47386
    • James Clark's avatar
      coresight: no-op refactor to make INSTP0 check more idiomatic · d05bbad0
      James Clark authored
      The spec says this:
      
        P0 tracing support field. The permitted values are:
            0b00  Tracing of load and store instructions as P0 elements is not
                  supported.
            0b11  Tracing of load and store instructions as P0 elements is
                  supported, so TRCCONFIGR.INSTP0 is supported.
      
                  All other values are reserved.
      
      The value we are looking for is 0b11 so simplify this. The double read
      and && was a bit obfuscated.
      Suggested-by: default avatarSuzuki Poulose <suzuki.poulose@arm.com>
      Signed-off-by: default avatarJames Clark <james.clark@arm.com>
      Link: https://lore.kernel.org/r/20220203115336.119735-2-james.clark@arm.comSigned-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      d05bbad0
  4. 26 Nov, 2021 1 commit
  5. 27 Oct, 2021 3 commits
  6. 18 Aug, 2021 1 commit
  7. 15 Jun, 2021 1 commit
  8. 07 Apr, 2021 1 commit
  9. 06 Apr, 2021 4 commits
  10. 11 Feb, 2021 1 commit
    • Suzuki K Poulose's avatar
      coresight: etm-perf: Support PID tracing for kernel at EL2 · 88f11864
      Suzuki K Poulose authored
      When the kernel is running at EL2, the PID is stored in CONTEXTIDR_EL2.
      So, tracing CONTEXTIDR_EL1 doesn't give us the pid of the process.
      Thus we should trace the VMID with VMIDOPT set to trace CONTEXTIDR_EL2
      instead of CONTEXTIDR_EL1.  Given that we have an existing config
      option "contextid" and this will be useful for tracing virtual machines
      (when we get to support virtualization).
      
      So instead, this patch extends option CTXTID with an extra bit
      ETM_OPT_CTXTID2 (bit 15), thus on an EL2 kernel, we will have another
      bit available for the perf tool: ETM_OPT_CTXTID is for kernel running in
      EL1, ETM_OPT_CTXTID2 is used when kernel runs in EL2 with VHE enabled.
      
      The tool must be backward compatible for users, i.e, "contextid" today
      traces PID and that should remain the same; for this purpose, the perf
      tool is updated to automatically set corresponding bit for the
      "contextid" config, therefore, the user doesn't have to bother which EL
      the kernel is running.
      
        i.e, perf record -e cs_etm/contextid/u --
      
      will always do the "pid" tracing, independent of the kernel EL.
      
      The driver parses the format "contextid", which traces CONTEXTIDR_EL1
      for ETM_OPT_CTXTID (on EL1 kernel) and traces CONTEXTIDR_EL2 for
      ETM_OPT_CTXTID2 (on EL2 kernel).
      
      Besides the enhancement for format "contexid", extra two formats are
      introduced: "contextid1" and "contextid2".  This considers to support
      tracing both CONTEXTIDR_EL1 and CONTEXTIDR_EL2 when the kernel is
      running at EL2.  Finally, the PMU formats are defined as follow:
      
        "contextid1": Available on both EL1 kernel and EL2 kernel.  When the
                      kernel is running at EL1, "contextid1" enables the PID
      		tracing; when the kernel is running at EL2, this enables
      		tracing the PID of guest applications.
      
        "contextid2": Only usable when the kernel is running at EL2.  When
                      selected, enables PID tracing on EL2 kernel.
      
        "contextid":  Will be an alias for the option that enables PID
                      tracing.  I.e,
                      contextid == contextid1, on EL1 kernel.
                      contextid == contextid2, on EL2 kernel.
      
      Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
      Cc: Al Grant <al.grant@arm.com>
      Cc: Mike Leach <mike.leach@linaro.org>
      Cc: Leo Yan <leo.yan@linaro.org>
      Reviewed-by: default avatarMike Leach <mike.leach@linaro.org>
      Signed-off-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
      [ Added two config formats: contextid1, contextid2 ]
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
      Link: https://lore.kernel.org/r/20210206150833.42120-4-leo.yan@linaro.org
      Link: https://lore.kernel.org/r/20210211172038.2483517-3-mathieu.poirier@linaro.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      88f11864
  11. 05 Feb, 2021 1 commit
  12. 04 Feb, 2021 16 commits