• Kan Liang's avatar
    perf tools: Support data block and addr block · a054c298
    Kan Liang authored
    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.
    
    Committer testing:
    
    So in machines without this capability we get a "N/A" filling the new "Blocked"
    column:
    
      $ perf mem record ls
      arch     certs	 CREDITS  Documentation  include  ipc     Kconfig  lib       MAINTAINERS  mm   samples  security  usr    block
      COPYING	 crypto	 drivers  fs             init     Kbuild  kernel   LICENSES  Makefile     net  README   scripts   sound  tools
      virt
      [ perf record: Woken up 1 times to write data ]
      [ perf record: Captured and wrote 0.008 MB perf.data (17 samples) ]
      $
      $ perf mem report --stdio
      # To dis...
    a054c298
builtin-mem.c 11.4 KB