mirror of https://gitee.com/openkylin/linux.git
perf util: Rename read_*() functions in trace-event-info.c
It's confusing to have same name for two difference functions which does something opposite way. Since what they do in this file is read *AND* writing some of tracing metadata files, rename them to record_*() looks better to me. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Steven Rostedt <rostedt@goodmis.org> Link: http://lkml.kernel.org/r/1370323231-14022-15-git-send-email-namhyung@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
47390ae2af
commit
077f159d04
|
@ -101,7 +101,7 @@ static int record_file(const char *file, ssize_t hdr_sz)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int read_header_files(void)
|
static int record_header_files(void)
|
||||||
{
|
{
|
||||||
char *path;
|
char *path;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
@ -240,7 +240,7 @@ static int copy_event_system(const char *sys, struct tracepoint_path *tps)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int read_ftrace_files(struct tracepoint_path *tps)
|
static int record_ftrace_files(struct tracepoint_path *tps)
|
||||||
{
|
{
|
||||||
char *path;
|
char *path;
|
||||||
int ret;
|
int ret;
|
||||||
|
@ -269,7 +269,7 @@ static bool system_in_tp_list(char *sys, struct tracepoint_path *tps)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int read_event_files(struct tracepoint_path *tps)
|
static int record_event_files(struct tracepoint_path *tps)
|
||||||
{
|
{
|
||||||
struct dirent *dent;
|
struct dirent *dent;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
@ -344,7 +344,7 @@ static int read_event_files(struct tracepoint_path *tps)
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int read_proc_kallsyms(void)
|
static int record_proc_kallsyms(void)
|
||||||
{
|
{
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
const char *path = "/proc/kallsyms";
|
const char *path = "/proc/kallsyms";
|
||||||
|
@ -362,7 +362,7 @@ static int read_proc_kallsyms(void)
|
||||||
return record_file(path, 4);
|
return record_file(path, 4);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int read_ftrace_printk(void)
|
static int record_ftrace_printk(void)
|
||||||
{
|
{
|
||||||
unsigned int size;
|
unsigned int size;
|
||||||
char *path;
|
char *path;
|
||||||
|
@ -539,19 +539,19 @@ struct tracing_data *tracing_data_get(struct list_head *pattrs,
|
||||||
err = tracing_data_header();
|
err = tracing_data_header();
|
||||||
if (err)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
err = read_header_files();
|
err = record_header_files();
|
||||||
if (err)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
err = read_ftrace_files(tps);
|
err = record_ftrace_files(tps);
|
||||||
if (err)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
err = read_event_files(tps);
|
err = record_event_files(tps);
|
||||||
if (err)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
err = read_proc_kallsyms();
|
err = record_proc_kallsyms();
|
||||||
if (err)
|
if (err)
|
||||||
goto out;
|
goto out;
|
||||||
err = read_ftrace_printk();
|
err = record_ftrace_printk();
|
||||||
|
|
||||||
out:
|
out:
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue