• Namhyung Kim's avatar
    perf annotate-data: Handle array style accesses · d3030191
    Namhyung Kim authored
    On x86, instructions for array access often looks like below.
    
      mov  0x1234(%rax,%rbx,8), %rcx
    
    Usually the first register holds the type information and the second one
    has the index.  And the current code only looks up a variable for the
    first register.  But it's possible to be in the other way around so it
    needs to check the second register if the first one failed.
    
    The stat changed like this.
    
      Annotate data type stats:
      total 294, ok 148 (50.3%), bad 146 (49.7%)
      -----------------------------------------------------------
              30 : no_sym
              32 : no_mem_ops
              66 : no_var
              10 : no_typeinfo
               8 : bad_offset
    Reviewed-by: default avatarIan Rogers <irogers@google.com>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Masami Hiramatsu <mhiramat@kernel.org>
    Link: https://lore.kernel.org/r/20240117062657.985479-4-namhyung@kernel.orgSigned-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
    d3030191
annotate.h 12.8 KB