1. 10 Aug, 2022 2 commits
    • Claire Jensen's avatar
      perf test: JSON format checking · 0c343af2
      Claire Jensen authored
      Add field checking tests for perf stat JSON output.
      
      Sanity checks the expected number of fields are present, that the
      expected keys are present and they have the correct values.
      
      Committer notes:
      
      Had to fix this:
      
        -               $(INSTALL) tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib' \
        +               $(INSTALL) tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'; \
      
      Committer testing:
      
        [root@quaco ~]# perf test json
         90: perf stat JSON output linter                                    : Ok
        [root@quaco ~]# set -o vi
        [root@quaco ~]# perf test -v json
         90: perf stat JSON output linter                                    :
        --- start ---
        test child forked, pid 560794
        Checking json output: no args [Success]
        Checking json output: system wide [Success]
        Checking json output: system wide Checking json output: system wide no aggregation [Success]
        Checking json output: interval [Success]
        Checking json output: event [Success]
        Checking json output: per core [Success]
        Checking json output: per thread [Success]
        Checking json output: per die [Success]
        Checking json output: per node [Success]
        Checking json output: per socket [Success]
        test child finished with 0
        ---- end ----
        perf stat JSON output linter: Ok
        [root@quaco ~]#
      Signed-off-by: default avatarClaire Jensen <cjense@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alyssa Ross <hi@alyssa.is>
      Cc: Claire Jensen <clairej735@gmail.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Like Xu <likexu@tencent.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20220805200105.2020995-3-irogers@google.comSigned-off-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0c343af2
    • Claire Jensen's avatar
      perf stat: Add JSON output option · df936cad
      Claire Jensen authored
      CSV output is tricky to format and column layout changes are susceptible
      to breaking parsers. New JSON-formatted output has variable names to
      identify fields that are consistent and informative, making the output
      parseable.
      
      CSV output example:
      
        1.20,msec,task-clock:u,1204272,100.00,0.697,CPUs utilized
        0,,context-switches:u,1204272,100.00,0.000,/sec
        0,,cpu-migrations:u,1204272,100.00,0.000,/sec
        70,,page-faults:u,1204272,100.00,58.126,K/sec
      
      JSON output example:
      
        {"counter-value" : "3805.723968", "unit" : "msec", "event" :
        "cpu-clock", "event-runtime" : 3805731510100.00, "pcnt-running"
        : 100.00, "metric-value" : 4.007571, "metric-unit" : "CPUs utilized"}
        {"counter-value" : "6166.000000", "unit" : "", "event" :
        "context-switches", "event-runtime" : 3805723045100.00, "pcnt-running"
        : 100.00, "metric-value" : 1.620191, "metric-unit" : "K/sec"}
        {"counter-value" : "466.000000", "unit" : "", "event" :
        "cpu-migrations", "event-runtime" : 3805727613100.00, "pcnt-running"
        : 100.00, "metric-value" : 122.447136, "metric-unit" : "/sec"}
        {"counter-value" : "208.000000", "unit" : "", "event" :
        "page-faults", "event-runtime" : 3805726799100.00, "pcnt-running"
        : 100.00, "metric-value" : 54.654516, "metric-unit" : "/sec"}
      
      Also added documentation for JSON option.
      
      There is some tidy up of CSV code including a potential memory over run
      in the os.nfields set up. To facilitate this an AGGR_MAX value is added.
      
      Committer notes:
      
      Fixed up using PRIu64 to format u64 values, not %lu.
      
      Committer testing:
      
        ⬢[acme@toolbox perf]$ perf stat -j sleep 1
        {"counter-value" : "0.731750", "unit" : "msec", "event" : "task-clock:u", "event-runtime" : 731750, "pcnt-running" : 100.00, "metric-value" : 0.000731, "metric-unit" : "CPUs utilized"}
        {"counter-value" : "0.000000", "unit" : "", "event" : "context-switches:u", "event-runtime" : 731750, "pcnt-running" : 100.00, "metric-value" : 0.000000, "metric-unit" : "/sec"}
        {"counter-value" : "0.000000", "unit" : "", "event" : "cpu-migrations:u", "event-runtime" : 731750, "pcnt-running" : 100.00, "metric-value" : 0.000000, "metric-unit" : "/sec"}
        {"counter-value" : "75.000000", "unit" : "", "event" : "page-faults:u", "event-runtime" : 731750, "pcnt-running" : 100.00, "metric-value" : 102.494021, "metric-unit" : "K/sec"}
        {"counter-value" : "578765.000000", "unit" : "", "event" : "cycles:u", "event-runtime" : 379366, "pcnt-running" : 49.00, "metric-value" : 0.790933, "metric-unit" : "GHz"}
        {"counter-value" : "1298.000000", "unit" : "", "event" : "stalled-cycles-frontend:u", "event-runtime" : 768020, "pcnt-running" : 100.00, "metric-value" : 0.224271, "metric-unit" : "frontend cycles idle"}
        {"counter-value" : "21984.000000", "unit" : "", "event" : "stalled-cycles-backend:u", "event-runtime" : 768020, "pcnt-running" : 100.00, "metric-value" : 3.798433, "metric-unit" : "backend cycles idle"}
        {"counter-value" : "468197.000000", "unit" : "", "event" : "instructions:u", "event-runtime" : 768020, "pcnt-running" : 100.00, "metric-value" : 0.808959, "metric-unit" : "insn per cycle"}
        {"metric-value" : 0.046955, "metric-unit" : "stalled cycles per insn"}
        {"counter-value" : "103335.000000", "unit" : "", "event" : "branches:u", "event-runtime" : 768020, "pcnt-running" : 100.00, "metric-value" : 141.216262, "metric-unit" : "M/sec"}
        {"counter-value" : "2381.000000", "unit" : "", "event" : "branch-misses:u", "event-runtime" : 388654, "pcnt-running" : 50.00, "metric-value" : 2.304156, "metric-unit" : "of all branches"}
        ⬢[acme@toolbox perf]$
      Signed-off-by: default avatarClaire Jensen <cjense@google.com>
      Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Alyssa Ross <hi@alyssa.is>
      Cc: Claire Jensen <clairej735@gmail.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Like Xu <likexu@tencent.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Sandipan Das <sandipan.das@amd.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20220805200105.2020995-2-irogers@google.comSigned-off-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      df936cad
  2. 09 Aug, 2022 34 commits
  3. 08 Aug, 2022 4 commits
    • Linus Torvalds's avatar
      Merge tag 'rproc-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · 5d5d353b
      Linus Torvalds authored
      Pull remoteproc updates from Bjorn Andersson:
       "This introduces support for the remoteproc on Mediatek MT8188, and
        enables caches for MT8186 SCP. It adds support for PRU cores found on
        the TI K3 AM62x SoCs.
      
        It moves the recovery work after a firmware crash to an unbound
        workqueue, to allow recovery to happen in parallel.
      
        A new DMA API is introduced to release dma_mem for a device.
      
        It adds support a panic handler for the Qualcomm modem remoteproc,
        with the goal of having caches flushed in memory dumps for post-mortem
        debugging and it introduces a mechanism to wait for the modem firmware
        on SM8450 to decrypt part of its memory for post-mortem debugging.
      
        Qualcomm sysmon is restricted to only inform remote processors about
        peers that are actually running, to avoid a race where Linux tries to
        notify a recovering remote processor about its peers new state. A
        mechanism for waiting for the sysmon connection to be established is
        also introduced, to avoid out-of-sync updates for rapidly restarting
        remote processors.
      
        A number of Devicetree binding cleanups and conversions to YAML are
        introduced, to facilitate Devicetree validation. Lastly it introduces
        a number of smaller fixes and cleanups in the core and a few different
        drivers"
      
      * tag 'rproc-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (42 commits)
        remoteproc: qcom_q6v5_pas: Do not fail if regulators are not found
        drivers/remoteproc: fix repeated words in comments
        remoteproc: Directly use ida_alloc()/free()
        remoteproc: Use unbounded workqueue for recovery work
        remoteproc: using pm_runtime_resume_and_get instead of pm_runtime_get_sync
        remoteproc: qcom_q6v5_pas: Deal silently with optional px and cx regulators
        remoteproc: sysmon: Send sysmon state only for running rprocs
        remoteproc: sysmon: Wait for SSCTL service to come up
        remoteproc: qcom: q6v5: Set q6 state to offline on receiving wdog irq
        remoteproc: qcom: pas: Check if coredump is enabled
        remoteproc: qcom: pas: Mark devices as wakeup capable
        remoteproc: qcom: pas: Mark va as io memory
        remoteproc: qcom: pas: Add decrypt shutdown support for modem
        remoteproc: qcom: q6v5-mss: add powerdomains to MSM8996 config
        remoteproc: qcom_q6v5: Introduce panic handler for MSS
        remoteproc: qcom_q6v5_mss: Update MBA log info
        remoteproc: qcom: correct kerneldoc
        remoteproc: qcom_q6v5_mss: map/unmap metadata region before/after use
        remoteproc: qcom: using pm_runtime_resume_and_get to simplify the code
        remoteproc: mediatek: Support MT8188 SCP
        ...
      5d5d353b
    • Linus Torvalds's avatar
      Merge tag 'rpmsg-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux · c7268761
      Linus Torvalds authored
      Pull rpmsg updates from Bjorn Andersson:
       "This contains fixes and cleanups in the rpmsg core, Qualcomm SMD and
        GLINK drivers, a circular lock dependency in the Mediatek driver and
        a possible race condition in the rpmsg_char driver is resolved"
      
      * tag 'rpmsg-v5.20' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
        rpmsg: convert sysfs snprintf to sysfs_emit
        rpmsg: qcom_smd: Fix refcount leak in qcom_smd_parse_edge
        rpmsg: qcom: correct kerneldoc
        rpmsg: qcom: glink: remove unused name
        rpmsg: qcom: glink: replace strncpy() with strscpy_pad()
        rpmsg: Strcpy is not safe, use strscpy_pad() instead
        rpmsg: Fix possible refcount leak in rpmsg_register_device_override()
        rpmsg: Fix parameter naming for announce_create/destroy ops
        rpmsg: mtk_rpmsg: Fix circular locking dependency
        rpmsg: char: Add mutex protection for rpmsg_eptdev_open()
      c7268761
    • Linus Torvalds's avatar
      Merge tag 'linux-watchdog-5.20-rc1' of git://www.linux-watchdog.org/linux-watchdog · e6cc0b56
      Linus Torvalds authored
      Pull watchdog updates from Wim Van Sebroeck:
      
       - add RTL9310 support
      
       - sp805_wdt: add arm cmsdk apb wdt support
      
       - Remove #ifdef guards for PM related functions for several watchdog
         device drivers
      
       - pm8916_wdt reboot improvements
      
       - Several other fixes and improvements
      
      * tag 'linux-watchdog-5.20-rc1' of git://www.linux-watchdog.org/linux-watchdog: (24 commits)
        watchdog: armada_37xx_wdt: check the return value of devm_ioremap() in armada_37xx_wdt_probe()
        watchdog: dw_wdt: Fix comment typo
        watchdog: Fix comment typo
        dt-bindings: watchdog: Add fsl,scu-wdt yaml file
        watchdog:Fix typo in comment
        watchdog: pm8916_wdt: Handle watchdog enabled by bootloader
        watchdog: pm8916_wdt: Report reboot reason
        watchdog: pm8916_wdt: Avoid read of write-only PET register
        watchdog: wdat_wdt: Remove #ifdef guards for PM related functions
        watchdog: tegra_wdt: Remove #ifdef guards for PM related functions
        watchdog: st_lpc_wdt: Remove #ifdef guards for PM related functions
        watchdog: sama5d4_wdt: Remove #ifdef guards for PM related functions
        watchdog: s3c2410_wdt: Remove #ifdef guards for PM related functions
        watchdog: mtk_wdt: Remove #ifdef guards for PM related functions
        watchdog: dw_wdt: Remove #ifdef guards for PM related functions
        watchdog: bcm7038_wdt: Remove #ifdef guards for PM related functions
        watchdog: realtek-otto: add RTL9310 support
        dt-bindings: watchdog: realtek,otto-wdt: add RTL9310
        watchdog: sp805_wdt: add arm cmsdk apb wdt support
        watchdog: sp5100_tco: Fix a memory leak of EFCH MMIO resource
        ...
      e6cc0b56
    • Linus Torvalds's avatar
      Merge tag 'pm-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 507f811f
      Linus Torvalds authored
      Pull more power management updates from Rafael Wysocki:
       "These are ARM cpufreq updates and operating performance points (OPP)
        updates plus one cpuidle update adding a new trace point.
      
        Specifics:
      
         - Fix return error code in mtk_cpu_dvfs_info_init (Yang Yingliang).
      
         - Minor cleanups and support for new boards for Qcom cpufreq drivers
           (Bryan O'Donoghue, Konrad Dybcio, Pierre Gondois, and Yicong Yang).
      
         - Fix sparse warnings for Tegra cpufreq driver (Viresh Kumar).
      
         - Make dev_pm_opp_set_regulators() accept NULL terminated list
           (Viresh Kumar).
      
         - Add dev_pm_opp_set_config() and friends and migrate other users and
           helpers to using them (Viresh Kumar).
      
         - Add support for multiple clocks for a device (Viresh Kumar and
           Krzysztof Kozlowski).
      
         - Configure resources before adding OPP table for Venus (Stanimir
           Varbanov).
      
         - Keep reference count up for opp->np and opp_table->np while they
           are still in use (Liang He).
      
         - Minor OPP cleanups (Viresh Kumar and Yang Li).
      
         - Add a trace event for cpuidle to track missed (too deep or too
           shallow) wakeups (Kajetan Puchalski)"
      
      * tag 'pm-5.20-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (55 commits)
        cpuidle: Add cpu_idle_miss trace event
        venus: pm_helpers: Fix warning in OPP during probe
        OPP: Don't drop opp->np reference while it is still in use
        OPP: Don't drop opp_table->np reference while it is still in use
        cpufreq: tegra194: Staticize struct tegra_cpufreq_soc instances
        dt-bindings: cpufreq: cpufreq-qcom-hw: Add SM6375 compatible
        dt-bindings: opp: Add msm8939 to the compatible list
        dt-bindings: opp: Add missing compat devices
        dt-bindings: opp: opp-v2-kryo-cpu: Fix example binding checks
        cpufreq: Change order of online() CB and policy->cpus modification
        cpufreq: qcom-hw: Remove deprecated irq_set_affinity_hint() call
        cpufreq: qcom-hw: Disable LMH irq when disabling policy
        cpufreq: qcom-hw: Reset cancel_throttle when policy is re-enabled
        cpufreq: qcom-cpufreq-hw: use HZ_PER_KHZ macro in units.h
        cpufreq: mediatek: fix error return code in mtk_cpu_dvfs_info_init()
        OPP: Remove dev{m}_pm_opp_of_add_table_noclk()
        PM / devfreq: tegra30: Register config_clks helper
        OPP: Allow config_clks helper for single clk case
        OPP: Provide a simple implementation to configure multiple clocks
        OPP: Assert clk_count == 1 for single clk helpers
        ...
      507f811f