• L
    perf cs-etm: Set sample flags for exception packet · 96dce7f4
    Leo Yan 提交于
    The exception taken and returning are typical flow for instruction jump
    but it needs to be handled with exception packets. This patch is to set
    sample flags for exception packet.
    
    Since the exception packet contains the exception number, according to
    the exception number this patch makes decision for belonging to which
    exception types.
    
    The decoder have defined different exception number for ETMv3 and ETMv4
    separately, hence this patch needs firstly decide the ETM version by
    using the metadata magic number, and this patch adds helper function
    cs_etm__get_magic() for easily getting magic number.
    
    Based on different ETM version, the exception packet contains the
    exception number, according to the exception number this patch makes
    decision for the exception belonging to which exception types.
    
    In this patch, it introduces helper function cs_etm__is_svc_instr(); for
    ETMv4 CS_ETMV4_EXC_CALL covers SVC, SMC and HVC cases in the single
    exception number, thus need to use cs_etm__is_svc_instr() to decide an
    exception taken for system call.
    Signed-off-by: NLeo Yan <leo.yan@linaro.org>
    Reviewed-by: NMathieu Poirier <mathieu.poirier@linaro.org>
    Reviewed-by: NRobert Walker <robert.walker@arm.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Mike Leach <mike.leach@linaro.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Suzuki K Poulouse <suzuki.poulose@arm.com>
    Cc: coresight ml <coresight@lists.linaro.org>
    Cc: linux-arm-kernel@lists.infradead.org
    Link: http://lkml.kernel.org/r/20190129122842.32041-8-leo.yan@linaro.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    96dce7f4
cs-etm.c 49.6 KB