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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAP-5=fW-EYfy2Avdsopgp7BkCV-COYQJuP7=ZaPcfqa+wj37dQ@mail.gmail.com>
Date:   Thu, 5 May 2022 17:01:50 -0700
From:   Ian Rogers <irogers@...gle.com>
To:     Adrian Hunter <adrian.hunter@...el.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...hat.com>,
        Alexey Bayduraev <alexey.v.bayduraev@...ux.intel.com>,
        Namhyung Kim <namhyung@...nel.org>,
        Leo Yan <leo.yan@...aro.org>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH V1 16/23] perf intel-pt: Track sideband system-wide when needed

On Thu, May 5, 2022 at 9:58 AM Adrian Hunter <adrian.hunter@...el.com> wrote:
>
> User space tasks can migrate between CPUs, so when tracing selected CPUs,
> sideband for all CPUs is still needed. This is in preparation for allowing
> system-wide events on all CPUs while the user requested events are on only
> user requested CPUs.
>
> Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
> ---
>  tools/perf/arch/x86/util/intel-pt.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
>
> diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c
> index e45d64dec57c..62be78bc90b6 100644
> --- a/tools/perf/arch/x86/util/intel-pt.c
> +++ b/tools/perf/arch/x86/util/intel-pt.c
> @@ -864,20 +864,22 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
>
>         /* Add dummy event to keep tracking */
>         if (opts->full_auxtrace) {
> +               bool need_system_wide_tracking;

Nit: perhaps need_dummy_on_all_online_cpus

Acked-by: Ian Rogers <irogers@...gle.com>

Thanks,
Ian

>                 struct evsel *tracking_evsel;
>
> -               err = parse_events(evlist, "dummy:u", NULL);
> -               if (err)
> -                       return err;
> +               /*
> +                * User space tasks can migrate between CPUs, so when tracing
> +                * selected CPUs, sideband for all CPUs is still needed.
> +                */
> +               need_system_wide_tracking = evlist->core.has_user_cpus &&
> +                                           !intel_pt_evsel->core.attr.exclude_user;
>
> -               tracking_evsel = evlist__last(evlist);
> +               tracking_evsel = evlist__add_aux_dummy(evlist, need_system_wide_tracking);
> +               if (!tracking_evsel)
> +                       return -ENOMEM;
>
>                 evlist__set_tracking_event(evlist, tracking_evsel);
>
> -               tracking_evsel->core.attr.freq = 0;
> -               tracking_evsel->core.attr.sample_period = 1;
> -
> -               tracking_evsel->no_aux_samples = true;
>                 if (need_immediate)
>                         tracking_evsel->immediate = true;
>
> --
> 2.25.1
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ