perf tools: Rename perf_event::ksymbol_event to perf_event::ksymbol

Just like all the other meta events, that extra _event suffix is just
redundant, ditch it.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Song Liu <songliubraving@fb.com>
Link: https://lkml.kernel.org/n/tip-0q8b2xnfs17q0g523oej75s0@git.kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
上级 69d81f09
...@@ -161,7 +161,7 @@ static int perf_event__synthesize_one_bpf_prog(struct perf_session *session, ...@@ -161,7 +161,7 @@ static int perf_event__synthesize_one_bpf_prog(struct perf_session *session,
union perf_event *event, union perf_event *event,
struct record_opts *opts) struct record_opts *opts)
{ {
struct perf_record_ksymbol *ksymbol_event = &event->ksymbol_event; struct perf_record_ksymbol *ksymbol_event = &event->ksymbol;
struct perf_record_bpf_event *bpf_event = &event->bpf_event; struct perf_record_bpf_event *bpf_event = &event->bpf_event;
struct bpf_prog_info_linear *info_linear; struct bpf_prog_info_linear *info_linear;
struct perf_tool *tool = session->tool; struct perf_tool *tool = session->tool;
......
...@@ -1486,9 +1486,9 @@ static size_t perf_event__fprintf_lost(union perf_event *event, FILE *fp) ...@@ -1486,9 +1486,9 @@ static size_t perf_event__fprintf_lost(union perf_event *event, FILE *fp)
size_t perf_event__fprintf_ksymbol(union perf_event *event, FILE *fp) size_t perf_event__fprintf_ksymbol(union perf_event *event, FILE *fp)
{ {
return fprintf(fp, " addr %" PRI_lx64 " len %u type %u flags 0x%x name %s\n", return fprintf(fp, " addr %" PRI_lx64 " len %u type %u flags 0x%x name %s\n",
event->ksymbol_event.addr, event->ksymbol_event.len, event->ksymbol.addr, event->ksymbol.len,
event->ksymbol_event.ksym_type, event->ksymbol.ksym_type,
event->ksymbol_event.flags, event->ksymbol_event.name); event->ksymbol.flags, event->ksymbol.name);
} }
size_t perf_event__fprintf_bpf_event(union perf_event *event, FILE *fp) size_t perf_event__fprintf_bpf_event(union perf_event *event, FILE *fp)
......
...@@ -561,7 +561,7 @@ union perf_event { ...@@ -561,7 +561,7 @@ union perf_event {
struct perf_record_throttle throttle; struct perf_record_throttle throttle;
struct perf_record_sample sample; struct perf_record_sample sample;
struct perf_record_bpf_event bpf_event; struct perf_record_bpf_event bpf_event;
struct perf_record_ksymbol ksymbol_event; struct perf_record_ksymbol ksymbol;
struct attr_event attr; struct attr_event attr;
struct event_update_event event_update; struct event_update_event event_update;
struct event_type_event event_type; struct event_type_event event_type;
......
...@@ -713,20 +713,20 @@ static int machine__process_ksymbol_register(struct machine *machine, ...@@ -713,20 +713,20 @@ static int machine__process_ksymbol_register(struct machine *machine,
struct symbol *sym; struct symbol *sym;
struct map *map; struct map *map;
map = map_groups__find(&machine->kmaps, event->ksymbol_event.addr); map = map_groups__find(&machine->kmaps, event->ksymbol.addr);
if (!map) { if (!map) {
map = dso__new_map(event->ksymbol_event.name); map = dso__new_map(event->ksymbol.name);
if (!map) if (!map)
return -ENOMEM; return -ENOMEM;
map->start = event->ksymbol_event.addr; map->start = event->ksymbol.addr;
map->end = map->start + event->ksymbol_event.len; map->end = map->start + event->ksymbol.len;
map_groups__insert(&machine->kmaps, map); map_groups__insert(&machine->kmaps, map);
} }
sym = symbol__new(map->map_ip(map, map->start), sym = symbol__new(map->map_ip(map, map->start),
event->ksymbol_event.len, event->ksymbol.len,
0, 0, event->ksymbol_event.name); 0, 0, event->ksymbol.name);
if (!sym) if (!sym)
return -ENOMEM; return -ENOMEM;
dso__insert_symbol(map->dso, sym); dso__insert_symbol(map->dso, sym);
...@@ -739,7 +739,7 @@ static int machine__process_ksymbol_unregister(struct machine *machine, ...@@ -739,7 +739,7 @@ static int machine__process_ksymbol_unregister(struct machine *machine,
{ {
struct map *map; struct map *map;
map = map_groups__find(&machine->kmaps, event->ksymbol_event.addr); map = map_groups__find(&machine->kmaps, event->ksymbol.addr);
if (map) if (map)
map_groups__remove(&machine->kmaps, map); map_groups__remove(&machine->kmaps, map);
...@@ -753,7 +753,7 @@ int machine__process_ksymbol(struct machine *machine __maybe_unused, ...@@ -753,7 +753,7 @@ int machine__process_ksymbol(struct machine *machine __maybe_unused,
if (dump_trace) if (dump_trace)
perf_event__fprintf_ksymbol(event, stdout); perf_event__fprintf_ksymbol(event, stdout);
if (event->ksymbol_event.flags & PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER) if (event->ksymbol.flags & PERF_RECORD_KSYMBOL_FLAGS_UNREGISTER)
return machine__process_ksymbol_unregister(machine, event, return machine__process_ksymbol_unregister(machine, event,
sample); sample);
return machine__process_ksymbol_register(machine, event, sample); return machine__process_ksymbol_register(machine, event, sample);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册