mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
perf tools: Pass tool context in the the perf_event_ops functions
So that we don't need to have that many globals. Next steps will remove the 'session' pointer, that in most cases is not needed. Then we can rename perf_event_ops to 'perf_tool' that better describes this class hierarchy. Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> 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-wp4djox7x6w1i2bab1pt4xxp@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
7009cc34b9
commit
d20deb64e0
20 changed files with 519 additions and 372 deletions
|
@ -274,7 +274,8 @@ static int cpus_cstate_state[MAX_CPUS];
|
|||
static u64 cpus_pstate_start_times[MAX_CPUS];
|
||||
static u64 cpus_pstate_state[MAX_CPUS];
|
||||
|
||||
static int process_comm_event(union perf_event *event,
|
||||
static int process_comm_event(struct perf_event_ops *ops __used,
|
||||
union perf_event *event,
|
||||
struct perf_sample *sample __used,
|
||||
struct perf_session *session __used)
|
||||
{
|
||||
|
@ -282,7 +283,8 @@ static int process_comm_event(union perf_event *event,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int process_fork_event(union perf_event *event,
|
||||
static int process_fork_event(struct perf_event_ops *ops __used,
|
||||
union perf_event *event,
|
||||
struct perf_sample *sample __used,
|
||||
struct perf_session *session __used)
|
||||
{
|
||||
|
@ -290,7 +292,8 @@ static int process_fork_event(union perf_event *event,
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int process_exit_event(union perf_event *event,
|
||||
static int process_exit_event(struct perf_event_ops *ops __used,
|
||||
union perf_event *event,
|
||||
struct perf_sample *sample __used,
|
||||
struct perf_session *session __used)
|
||||
{
|
||||
|
@ -487,7 +490,8 @@ static void sched_switch(int cpu, u64 timestamp, struct trace_entry *te)
|
|||
}
|
||||
|
||||
|
||||
static int process_sample_event(union perf_event *event __used,
|
||||
static int process_sample_event(struct perf_event_ops *ops __used,
|
||||
union perf_event *event __used,
|
||||
struct perf_sample *sample,
|
||||
struct perf_evsel *evsel,
|
||||
struct perf_session *session __used)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue