Skip to content

Commit 055c67e

Browse files
committed
perf tools: Move event synthesizing routines to separate .c file
For better grouping, in time we may end up making most of these static, i.e. generalizing the 'perf record' synthesizing code so that based on the target it can do the right thing and call the needed synthesizers. Cc: Adrian Hunter <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Link: https://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
1 parent 5cac8ea commit 055c67e

File tree

13 files changed

+1928
-1923
lines changed

13 files changed

+1928
-1923
lines changed

tools/perf/builtin-record.c

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,15 +1181,6 @@ static void workload_exec_failed_signal(int signo __maybe_unused,
11811181
static void snapshot_sig_handler(int sig);
11821182
static void alarm_sig_handler(int sig);
11831183

1184-
int __weak
1185-
perf_event__synth_time_conv(const struct perf_event_mmap_page *pc __maybe_unused,
1186-
struct perf_tool *tool __maybe_unused,
1187-
perf_event__handler_t process __maybe_unused,
1188-
struct machine *machine __maybe_unused)
1189-
{
1190-
return 0;
1191-
}
1192-
11931184
static const struct perf_event_mmap_page *
11941185
perf_evlist__pick_pc(struct evlist *evlist)
11951186
{

tools/perf/util/Build

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ perf-y += stat-display.o
8686
perf-y += record.o
8787
perf-y += srcline.o
8888
perf-y += srccode.o
89+
perf-y += synthetic-events.o
8990
perf-y += data.o
9091
perf-y += tsc.o
9192
perf-y += cloexec.o

tools/perf/util/cs-etm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "thread.h"
3636
#include "thread-stack.h"
3737
#include <tools/libc_compat.h>
38+
#include "util/synthetic-events.h"
3839

3940
#define MAX_TIMESTAMP (~0ULL)
4041

0 commit comments

Comments
 (0)