diff options
author | Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> | 2018-08-08 14:03:04 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2018-08-13 15:30:30 -0300 |
commit | 8b3e08722ec8b288066eab66193736a65645c0a2 (patch) | |
tree | 17352f96c7899267da2c2ec0b34d3941317c199c /tools/lib/traceevent/plugin_kvm.c | |
parent | dc05ebf373e9e66c27aae0d9059e5d4ac56f3be0 (diff) |
tools lib traceevent: Rename pevent field APIs
In order to make libtraceevent into a proper library, variables, data
structures and functions require a unique prefix to prevent name space
conflicts. That prefix will be "tep_" and not "pevent_". This changes
APIs: pevent_free_format, pevent_free_format_field, pevent_get_field_raw,
pevent_get_field_val, pevent_get_common_field_val, pevent_get_any_field_val
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lkml.kernel.org/r/20180808180702.821244942@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/traceevent/plugin_kvm.c')
-rw-r--r-- | tools/lib/traceevent/plugin_kvm.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tools/lib/traceevent/plugin_kvm.c b/tools/lib/traceevent/plugin_kvm.c index 4b3433763340..7ebe82bf19ce 100644 --- a/tools/lib/traceevent/plugin_kvm.c +++ b/tools/lib/traceevent/plugin_kvm.c @@ -254,10 +254,10 @@ static int print_exit_reason(struct trace_seq *s, struct tep_record *record, unsigned long long val; const char *reason; - if (pevent_get_field_val(s, event, field, record, &val, 1) < 0) + if (tep_get_field_val(s, event, field, record, &val, 1) < 0) return -1; - if (pevent_get_field_val(s, event, "isa", record, &isa, 0) < 0) + if (tep_get_field_val(s, event, "isa", record, &isa, 0) < 0) isa = 1; reason = find_exit_reason(isa, val); @@ -278,8 +278,8 @@ static int kvm_exit_handler(struct trace_seq *s, struct tep_record *record, tep_print_num_field(s, " rip 0x%lx", event, "guest_rip", record, 1); - if (pevent_get_field_val(s, event, "info1", record, &info1, 0) >= 0 - && pevent_get_field_val(s, event, "info2", record, &info2, 0) >= 0) + if (tep_get_field_val(s, event, "info1", record, &info1, 0) >= 0 + && tep_get_field_val(s, event, "info2", record, &info2, 0) >= 0) trace_seq_printf(s, " info %llx %llx", info1, info2); return 0; @@ -299,22 +299,22 @@ static int kvm_emulate_insn_handler(struct trace_seq *s, uint8_t *insn; const char *disasm; - if (pevent_get_field_val(s, event, "rip", record, &rip, 1) < 0) + if (tep_get_field_val(s, event, "rip", record, &rip, 1) < 0) return -1; - if (pevent_get_field_val(s, event, "csbase", record, &csbase, 1) < 0) + if (tep_get_field_val(s, event, "csbase", record, &csbase, 1) < 0) return -1; - if (pevent_get_field_val(s, event, "len", record, &len, 1) < 0) + if (tep_get_field_val(s, event, "len", record, &len, 1) < 0) return -1; - if (pevent_get_field_val(s, event, "flags", record, &flags, 1) < 0) + if (tep_get_field_val(s, event, "flags", record, &flags, 1) < 0) return -1; - if (pevent_get_field_val(s, event, "failed", record, &failed, 1) < 0) + if (tep_get_field_val(s, event, "failed", record, &failed, 1) < 0) return -1; - insn = pevent_get_field_raw(s, event, "insn", record, &llen, 1); + insn = tep_get_field_raw(s, event, "insn", record, &llen, 1); if (!insn) return -1; @@ -379,7 +379,7 @@ static int kvm_mmu_print_role(struct trace_seq *s, struct tep_record *record, }; union kvm_mmu_page_role role; - if (pevent_get_field_val(s, event, "role", record, &val, 1) < 0) + if (tep_get_field_val(s, event, "role", record, &val, 1) < 0) return -1; role.word = (int)val; @@ -409,7 +409,7 @@ static int kvm_mmu_print_role(struct trace_seq *s, struct tep_record *record, tep_print_num_field(s, " root %u ", event, "root_count", record, 1); - if (pevent_get_field_val(s, event, "unsync", record, &val, 1) < 0) + if (tep_get_field_val(s, event, "unsync", record, &val, 1) < 0) return -1; trace_seq_printf(s, "%s%c", val ? "unsync" : "sync", 0); @@ -422,12 +422,12 @@ static int kvm_mmu_get_page_handler(struct trace_seq *s, { unsigned long long val; - if (pevent_get_field_val(s, event, "created", record, &val, 1) < 0) + if (tep_get_field_val(s, event, "created", record, &val, 1) < 0) return -1; trace_seq_printf(s, "%s ", val ? "new" : "existing"); - if (pevent_get_field_val(s, event, "gfn", record, &val, 1) < 0) + if (tep_get_field_val(s, event, "gfn", record, &val, 1) < 0) return -1; trace_seq_printf(s, "sp gfn %llx ", val); |