mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
perf evsel: Precalculate the sample size
So that we don't have to store it in the perf_session instance, because in the future perf_session instances may have multiple evlists, each with different sample_type/sizes. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Namhyung Kim <namhyung@gmail.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/n/tip-ptod86fxkpgq3h62m9refkv4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
0ecf4f0c02
commit
bde09467b5
6 changed files with 24 additions and 25 deletions
|
@ -42,7 +42,6 @@ struct perf_session {
|
|||
*/
|
||||
struct hists hists;
|
||||
u64 sample_type;
|
||||
int sample_size;
|
||||
int fd;
|
||||
bool fd_pipe;
|
||||
bool repipe;
|
||||
|
@ -130,15 +129,9 @@ size_t perf_session__fprintf_dsos_buildid(struct perf_session *self,
|
|||
|
||||
size_t perf_session__fprintf_nr_events(struct perf_session *session, FILE *fp);
|
||||
|
||||
static inline int perf_session__parse_sample(struct perf_session *session,
|
||||
const union perf_event *event,
|
||||
struct perf_sample *sample)
|
||||
{
|
||||
return perf_event__parse_sample(event, session->sample_type,
|
||||
session->sample_size,
|
||||
session->sample_id_all, sample,
|
||||
session->header.needs_swap);
|
||||
}
|
||||
int perf_session__parse_sample(struct perf_session *session,
|
||||
const union perf_event *event,
|
||||
struct perf_sample *sample);
|
||||
|
||||
static inline int perf_session__synthesize_sample(struct perf_session *session,
|
||||
union perf_event *event,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue