• Kan Liang's avatar
    perf tools: Support arch specific PERF_SAMPLE_WEIGHT_STRUCT processing · fbefe9c2
    Kan Liang authored
    For X86, the var2_w field of PERF_SAMPLE_WEIGHT_STRUCT stands for the
    instruction latency. Current perf forces the var2_w to the data->ins_lat
    in the generic code. It works well for now because X86 is the only
    architecture that supports the PERF_SAMPLE_WEIGHT_STRUCT, but it may
    bring problems once other architectures support the sample type.  For
    example, the var2_w may be used to capture something else on PowerPC.
    
    Create two architecture specific functions to parse and synthesize the
    weight related samples. Move the X86 specific codes to the X86 version
    functions. Other architectures can implement their own functions later
    separately.
    Signed-off-by: default avatarKan Liang <kan.liang@linux.intel.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
    Cc: Jin Yao <yao.jin@linux.intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Link: http://lore.kernel.org/lkml/1612540912-6562-1-git-send-email-kan.liang@linux.intel.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    fbefe9c2
synthetic-events.c 51.8 KB