perf tools: Stop copying kallsyms into the perf.data file header

Since we now ask libtraceevent, the only user of this payload, to use
perf's symbol resolution routines, there is no need to carry about
~4.5MB per perf.data when we can get it from one of the places the perf
symbol resolution looks for that symtab (debuginfo, ~/.debug/,
/proc/kallsyms, --symfs, etc), using the kernel and modules build-ids to
make sure the right table is used.
Acked-by: default avatarDavid Ahern <dsahern@gmail.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Borislav Petkov <bp@suse.de>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Link: http://lkml.kernel.org/n/tip-h89ituf9rso2rv1v7kjrbeda@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
parent 4263cece
...@@ -341,20 +341,14 @@ static int record_event_files(struct tracepoint_path *tps) ...@@ -341,20 +341,14 @@ static int record_event_files(struct tracepoint_path *tps)
static int record_proc_kallsyms(void) static int record_proc_kallsyms(void)
{ {
unsigned int size; unsigned long long size = 0;
const char *path = "/proc/kallsyms"; /*
struct stat st; * Just to keep older perf.data file parsers happy, record a zero
int ret, err = 0; * sized kallsyms file, i.e. do the same thing that was done when
* /proc/kallsyms (or something specified via --kallsyms, in a
ret = stat(path, &st); * different path) couldn't be read.
if (ret < 0) { */
/* not found */ return write(output_fd, &size, 4) != 4 ? -EIO : 0;
size = 0;
if (write(output_fd, &size, 4) != 4)
err = -EIO;
return err;
}
return record_file(path, 4);
} }
static int record_ftrace_printk(void) static int record_ftrace_printk(void)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment