aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/python.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/python.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/python.c')
-rw-r--r--tools/perf/util/python.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/perf/util/python.c b/tools/perf/util/python.c
index ebf84fe8cd29..50150dfc0cdf 100644
--- a/tools/perf/util/python.c
+++ b/tools/perf/util/python.c
@@ -348,28 +348,28 @@ tracepoint_field(struct pyrf_event *pe, struct tep_format_field *field)
348 unsigned long long val; 348 unsigned long long val;
349 unsigned int offset, len; 349 unsigned int offset, len;
350 350
351 if (field->flags & FIELD_IS_ARRAY) { 351 if (field->flags & TEP_FIELD_IS_ARRAY) {
352 offset = field->offset; 352 offset = field->offset;
353 len = field->size; 353 len = field->size;
354 if (field->flags & FIELD_IS_DYNAMIC) { 354 if (field->flags & TEP_FIELD_IS_DYNAMIC) {
355 val = tep_read_number(pevent, data + offset, len); 355 val = tep_read_number(pevent, data + offset, len);
356 offset = val; 356 offset = val;
357 len = offset >> 16; 357 len = offset >> 16;
358 offset &= 0xffff; 358 offset &= 0xffff;
359 } 359 }
360 if (field->flags & FIELD_IS_STRING && 360 if (field->flags & TEP_FIELD_IS_STRING &&
361 is_printable_array(data + offset, len)) { 361 is_printable_array(data + offset, len)) {
362 ret = _PyUnicode_FromString((char *)data + offset); 362 ret = _PyUnicode_FromString((char *)data + offset);
363 } else { 363 } else {
364 ret = PyByteArray_FromStringAndSize((const char *) data + offset, len); 364 ret = PyByteArray_FromStringAndSize((const char *) data + offset, len);
365 field->flags &= ~FIELD_IS_STRING; 365 field->flags &= ~TEP_FIELD_IS_STRING;
366 } 366 }
367 } else { 367 } else {
368 val = tep_read_number(pevent, data + field->offset, 368 val = tep_read_number(pevent, data + field->offset,
369 field->size); 369 field->size);
370 if (field->flags & FIELD_IS_POINTER) 370 if (field->flags & TEP_FIELD_IS_POINTER)
371 ret = PyLong_FromUnsignedLong((unsigned long) val); 371 ret = PyLong_FromUnsignedLong((unsigned long) val);
372 else if (field->flags & FIELD_IS_SIGNED) 372 else if (field->flags & TEP_FIELD_IS_SIGNED)
373 ret = PyLong_FromLong((long) val); 373 ret = PyLong_FromLong((long) val);
374 else 374 else
375 ret = PyLong_FromUnsignedLong((unsigned long) val); 375 ret = PyLong_FromUnsignedLong((unsigned long) val);