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: <CAM9d7cj-q_-+98o-VH02WhC+wcJ44bAG8ZyV1UFN7ATT7Lxn6w@mail.gmail.com>
Date:   Fri, 5 Feb 2021 20:02:06 +0900
From:   Namhyung Kim <namhyung@...nel.org>
To:     Kan Liang <kan.liang@...ux.intel.com>
Cc:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Ingo Molnar <mingo@...nel.org>,
        linux-kernel <linux-kernel@...r.kernel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        Stephane Eranian <eranian@...gle.com>,
        Jiri Olsa <jolsa@...hat.com>, Andi Kleen <ak@...ux.intel.com>,
        Yao Jin <yao.jin@...ux.intel.com>, maddy@...ux.vnet.ibm.com
Subject: Re: [PATCH 3/9] perf tools: Support data block and addr block

On Wed, Feb 3, 2021 at 5:14 AM <kan.liang@...ux.intel.com> wrote:
>
> From: Kan Liang <kan.liang@...ux.intel.com>
>
> Two new data source fields, to indicate the block reasons of a load
> instruction, are introduced on the Intel Sapphire Rapids server. The
> fields can be used by the memory profiling.
>
> Add a new sort function, SORT_MEM_BLOCKED, for the two fields.
>
> For the previous platforms or the block reason is unknown, print "N/A"
> for the block reason.
>
> Add blocked as a default mem sort key for perf report and
> perf mem report.
>
> Signed-off-by: Kan Liang <kan.liang@...ux.intel.com>
> ---
[SNIP]
> +int perf_mem__blk_scnprintf(char *out, size_t sz, struct mem_info *mem_info)
> +{
> +       size_t l = 0;
> +       u64 mask = PERF_MEM_BLK_NA;
> +
> +       sz -= 1; /* -1 for null termination */
> +       out[0] = '\0';
> +
> +       if (mem_info)
> +               mask = mem_info->data_src.mem_blk;
> +
> +       if (!mask || (mask & PERF_MEM_BLK_NA)) {
> +               l += scnprintf(out + l, sz - l, " N/A");
> +               return l;
> +       }
> +       if (mask & PERF_MEM_BLK_DATA)
> +               l += scnprintf(out + l, sz - l, " Data");
> +       if (mask & PERF_MEM_BLK_ADDR)
> +               l += scnprintf(out + l, sz - l, " Addr");

So this means it's possible to have BLK_DATA and BLK_ADDR
together and in that case it'll print "DataAddr", right?

Thanks,
Namhyung


> +
> +       return l;
> +}
> +
>  int perf_script__meminfo_scnprintf(char *out, size_t sz, struct mem_info *mem_info)
>  {
>         int i = 0;
> @@ -348,6 +371,8 @@ int perf_script__meminfo_scnprintf(char *out, size_t sz, struct mem_info *mem_in
>         i += perf_mem__tlb_scnprintf(out + i, sz - i, mem_info);
>         i += scnprintf(out + i, sz - i, "|LCK ");
>         i += perf_mem__lck_scnprintf(out + i, sz - i, mem_info);
> +       i += scnprintf(out + i, sz - i, "|BLK ");
> +       i += perf_mem__blk_scnprintf(out + i, sz - i, mem_info);
>
>         return i;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ