aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/scripting-engines/trace-event-perl.c
diff options
context:
space:
mode:
authorTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>2018-09-19 14:56:46 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-09-19 16:14:13 -0400
commitbb39ccb204cc2e8135660b9cb768ffcf242bf33e (patch)
tree13ff769289faf758328f46a916af7ee6c0dffc57 /tools/perf/util/scripting-engines/trace-event-perl.c
parent2c92f9828b3ca4e82e7ceffeea76c6fba4044acc (diff)
tools lib traceevent, perf tools: Rename enum format_flags to enum tep_format_flags
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_". This renames enum format_flags to enum tep_format_flags and adds prefix TEP_ to all of its members. Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> Cc: linux-trace-devel@vger.kernel.org Link: http://lkml.kernel.org/r/20180919185722.803127871@goodmis.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
-rw-r--r--tools/perf/util/scripting-engines/trace-event-perl.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tools/perf/util/scripting-engines/trace-event-perl.c b/tools/perf/util/scripting-engines/trace-event-perl.c
index 1bb0b0c685b7..5d6a55183ad6 100644
--- a/tools/perf/util/scripting-engines/trace-event-perl.c
+++ b/tools/perf/util/scripting-engines/trace-event-perl.c
@@ -388,9 +388,9 @@ static void perl_process_tracepoint(struct perf_sample *sample,
388 /* common fields other than pid can be accessed via xsub fns */ 388 /* common fields other than pid can be accessed via xsub fns */
389 389
390 for (field = event->format.fields; field; field = field->next) { 390 for (field = event->format.fields; field; field = field->next) {
391 if (field->flags & FIELD_IS_STRING) { 391 if (field->flags & TEP_FIELD_IS_STRING) {
392 int offset; 392 int offset;
393 if (field->flags & FIELD_IS_DYNAMIC) { 393 if (field->flags & TEP_FIELD_IS_DYNAMIC) {
394 offset = *(int *)(data + field->offset); 394 offset = *(int *)(data + field->offset);
395 offset &= 0xffff; 395 offset &= 0xffff;
396 } else 396 } else
@@ -399,7 +399,7 @@ static void perl_process_tracepoint(struct perf_sample *sample,
399 } else { /* FIELD_IS_NUMERIC */ 399 } else { /* FIELD_IS_NUMERIC */
400 val = read_size(event, data + field->offset, 400 val = read_size(event, data + field->offset,
401 field->size); 401 field->size);
402 if (field->flags & FIELD_IS_SIGNED) { 402 if (field->flags & TEP_FIELD_IS_SIGNED) {
403 XPUSHs(sv_2mortal(newSViv(val))); 403 XPUSHs(sv_2mortal(newSViv(val)));
404 } else { 404 } else {
405 XPUSHs(sv_2mortal(newSVuv(val))); 405 XPUSHs(sv_2mortal(newSVuv(val)));
@@ -646,11 +646,11 @@ sub print_backtrace\n\
646 count++; 646 count++;
647 647
648 fprintf(ofp, "%s=", f->name); 648 fprintf(ofp, "%s=", f->name);
649 if (f->flags & FIELD_IS_STRING || 649 if (f->flags & TEP_FIELD_IS_STRING ||
650 f->flags & FIELD_IS_FLAG || 650 f->flags & TEP_FIELD_IS_FLAG ||
651 f->flags & FIELD_IS_SYMBOLIC) 651 f->flags & TEP_FIELD_IS_SYMBOLIC)
652 fprintf(ofp, "%%s"); 652 fprintf(ofp, "%%s");
653 else if (f->flags & FIELD_IS_SIGNED) 653 else if (f->flags & TEP_FIELD_IS_SIGNED)
654 fprintf(ofp, "%%d"); 654 fprintf(ofp, "%%d");
655 else 655 else
656 fprintf(ofp, "%%u"); 656 fprintf(ofp, "%%u");
@@ -668,7 +668,7 @@ sub print_backtrace\n\
668 if (++count % 5 == 0) 668 if (++count % 5 == 0)
669 fprintf(ofp, "\n\t "); 669 fprintf(ofp, "\n\t ");
670 670
671 if (f->flags & FIELD_IS_FLAG) { 671 if (f->flags & TEP_FIELD_IS_FLAG) {
672 if ((count - 1) % 5 != 0) { 672 if ((count - 1) % 5 != 0) {
673 fprintf(ofp, "\n\t "); 673 fprintf(ofp, "\n\t ");
674 count = 4; 674 count = 4;
@@ -678,7 +678,7 @@ sub print_backtrace\n\
678 event->name); 678 event->name);
679 fprintf(ofp, "\"%s\", $%s)", f->name, 679 fprintf(ofp, "\"%s\", $%s)", f->name,
680 f->name); 680 f->name);
681 } else if (f->flags & FIELD_IS_SYMBOLIC) { 681 } else if (f->flags & TEP_FIELD_IS_SYMBOLIC) {
682 if ((count - 1) % 5 != 0) { 682 if ((count - 1) % 5 != 0) {
683 fprintf(ofp, "\n\t "); 683 fprintf(ofp, "\n\t ");
684 count = 4; 684 count = 4;