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
| ||
|
Date: Mon, 11 Jan 2021 09:55:16 +0000 From: Suzuki K Poulose <suzuki.poulose@....com> To: Leo Yan <leo.yan@...aro.org>, Arnaldo Carvalho de Melo <acme@...nel.org>, Mathieu Poirier <mathieu.poirier@...aro.org>, Mike Leach <mike.leach@...aro.org>, Alexander Shishkin <alexander.shishkin@...ux.intel.com>, John Garry <john.garry@...wei.com>, Will Deacon <will@...nel.org>, Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, Mark Rutland <mark.rutland@....com>, Jiri Olsa <jolsa@...hat.com>, Namhyung Kim <namhyung@...nel.org>, Daniel Kiss <Daniel.Kiss@....com>, Denis Nikitin <denik@...omium.org>, coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org Subject: Re: [PATCH v1 6/7] perf cs-etm: Add helper cs_etm__get_pid_fmt() On 1/9/21 7:44 AM, Leo Yan wrote: > This patch adds helper function cs_etm__get_pid_fmt(), by passing > parameter "traceID", it returns the corresponding PID format. > > Signed-off-by: Leo Yan <leo.yan@...aro.org> Acked-by: Suzuki K Poulose <suzuki.poulose@....com> > --- > tools/perf/util/cs-etm.c | 18 ++++++++++++++++++ > tools/perf/util/cs-etm.h | 1 + > 2 files changed, 19 insertions(+) > > diff --git a/tools/perf/util/cs-etm.c b/tools/perf/util/cs-etm.c > index 8c125134a756..6705d39c8cee 100644 > --- a/tools/perf/util/cs-etm.c > +++ b/tools/perf/util/cs-etm.c > @@ -157,6 +157,24 @@ int cs_etm__get_cpu(u8 trace_chan_id, int *cpu) > return 0; > } > > +int cs_etm__get_pid_fmt(u8 trace_chan_id, u64 *pid_fmt) > +{ > + struct int_node *inode; > + u64 *metadata; > + > + inode = intlist__find(traceid_list, trace_chan_id); > + if (!inode) > + return -EINVAL; > + > + metadata = inode->priv; > + if (metadata[CS_ETM_MAGIC] == __perf_cs_etmv3_magic) > + *pid_fmt = metadata[CS_ETM_PID_FMT]; > + else > + *pid_fmt = metadata[CS_ETMV4_PID_FMT]; > + > + return 0; > +} > + > void cs_etm__etmq_set_traceid_queue_timestamp(struct cs_etm_queue *etmq, > u8 trace_chan_id) > { > diff --git a/tools/perf/util/cs-etm.h b/tools/perf/util/cs-etm.h > index 8cbbea6100a1..98801040175f 100644 > --- a/tools/perf/util/cs-etm.h > +++ b/tools/perf/util/cs-etm.h > @@ -175,6 +175,7 @@ struct cs_etm_packet_queue { > int cs_etm__process_auxtrace_info(union perf_event *event, > struct perf_session *session); > int cs_etm__get_cpu(u8 trace_chan_id, int *cpu); > +int cs_etm__get_pid_fmt(u8 trace_chan_id, u64 *pid_fmt); > int cs_etm__etmq_set_tid(struct cs_etm_queue *etmq, > pid_t tid, u8 trace_chan_id); > bool cs_etm__etmq_is_timeless(struct cs_etm_queue *etmq); >
Powered by blists - more mailing lists