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]
Date:   Fri, 5 Feb 2021 09:17:36 -0500
From:   "Liang, Kan" <kan.liang@...ux.intel.com>
To:     Namhyung Kim <namhyung@...nel.org>
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 2/5/2021 6:02 AM, Namhyung Kim wrote:
> 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?

Yes, it's possible. If so, it will print "Data Addr".

Thanks,
Kan
> 
> 
>> +
>> +       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