lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <30c22df5-9815-4a73-9a12-165d9045a667@linux.intel.com>
Date: Wed, 6 Nov 2024 12:32:39 -0500
From: "Liang, Kan" <kan.liang@...ux.intel.com>
To: Ian Rogers <irogers@...gle.com>, Peter Zijlstra <peterz@...radead.org>,
 Ingo Molnar <mingo@...hat.com>, Arnaldo Carvalho de Melo <acme@...nel.org>,
 Namhyung Kim <namhyung@...nel.org>, Mark Rutland <mark.rutland@....com>,
 Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
 Jiri Olsa <jolsa@...nel.org>, Adrian Hunter <adrian.hunter@...el.com>,
 linux-perf-users@...r.kernel.org, linux-kernel@...r.kernel.org,
 Perry Taylor <perry.taylor@...el.com>, Samantha Alt
 <samantha.alt@...el.com>, Caleb Biggers <caleb.biggers@...el.com>,
 Weilin Wang <weilin.wang@...el.com>, Edward Baker <edward.baker@...el.com>
Subject: Re: [PATCH v4 03/22] perf jevents: Add smi metric group for Intel
 models



On 2024-09-26 1:50 p.m., Ian Rogers wrote:
> Allow duplicated metric to be dropped from json files.
> 
> Signed-off-by: Ian Rogers <irogers@...gle.com>
> ---
>  tools/perf/pmu-events/intel_metrics.py | 21 ++++++++++++++++++++-
>  1 file changed, 20 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/pmu-events/intel_metrics.py b/tools/perf/pmu-events/intel_metrics.py
> index f875eb844c78..f34b4230a4ee 100755
> --- a/tools/perf/pmu-events/intel_metrics.py
> +++ b/tools/perf/pmu-events/intel_metrics.py
> @@ -2,7 +2,7 @@
>  # SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
>  from metric import (d_ratio, has_event, max, Event, JsonEncodeMetric,
>                      JsonEncodeMetricGroupDescriptions, LoadEvents, Metric,
> -                    MetricGroup, Select)
> +                    MetricGroup, MetricRef, Select)
>  import argparse
>  import json
>  import math
> @@ -56,6 +56,24 @@ def Rapl() -> MetricGroup:
>                       description="Running Average Power Limit (RAPL) power consumption estimates")
>  
>  
> +def Smi() -> MetricGroup:
> +    aperf = Event('msr/aperf/')
> +    cycles = Event('cycles')
> +    smi_num = Event('msr/smi/')
> +    smi_cycles = Select(Select((aperf - cycles) / aperf, smi_num > 0, 0),
> +                        has_event(aperf),
> +                        0)
> +    return MetricGroup('smi', [
> +        Metric('smi_num', 'Number of SMI interrupts.',
> +               Select(smi_num, has_event(smi_num), 0), 'SMI#'),
> +        # Note, the smi_cycles "Event" is really a reference to the metric.
> +        Metric('smi_cycles',
> +               'Percentage of cycles spent in System Management Interrupts. '
> +               'Requires /sys/devices/cpu/freeze_on_smi to be 1.',

It seems not work for hybrid?

Thanks,
Kan
> +               smi_cycles, '100%', threshold=(MetricRef('smi_cycles') > 0.10))
> +    ], description = 'System Management Interrupt metrics')
> +
> +
>  def main() -> None:
>    global _args
>  
> @@ -81,6 +99,7 @@ def main() -> None:
>    all_metrics = MetricGroup("", [
>        Idle(),
>        Rapl(),
> +      Smi(),
>    ])
>  
>  


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ