mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-26 14:17:26 -04:00
tools lib traceevent, perf tools: Rename enum print_arg_type to enum tep_print_arg_type
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 print_arg_type to enum tep_print_arg_type and add prefix TEP_ to all 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/20180919185723.533960748@goodmis.org Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
5647f94b90
commit
1e97216f20
4 changed files with 186 additions and 186 deletions
|
@ -193,7 +193,7 @@ static void try_call_object(const char *handler_name, PyObject *args)
|
|||
call_object(handler, args, handler_name);
|
||||
}
|
||||
|
||||
static void define_value(enum print_arg_type field_type,
|
||||
static void define_value(enum tep_print_arg_type field_type,
|
||||
const char *ev_name,
|
||||
const char *field_name,
|
||||
const char *field_value,
|
||||
|
@ -204,7 +204,7 @@ static void define_value(enum print_arg_type field_type,
|
|||
unsigned long long value;
|
||||
unsigned n = 0;
|
||||
|
||||
if (field_type == PRINT_SYMBOL)
|
||||
if (field_type == TEP_PRINT_SYMBOL)
|
||||
handler_name = "define_symbolic_value";
|
||||
|
||||
t = PyTuple_New(4);
|
||||
|
@ -223,7 +223,7 @@ static void define_value(enum print_arg_type field_type,
|
|||
Py_DECREF(t);
|
||||
}
|
||||
|
||||
static void define_values(enum print_arg_type field_type,
|
||||
static void define_values(enum tep_print_arg_type field_type,
|
||||
struct tep_print_flag_sym *field,
|
||||
const char *ev_name,
|
||||
const char *field_name)
|
||||
|
@ -235,7 +235,7 @@ static void define_values(enum print_arg_type field_type,
|
|||
define_values(field_type, field->next, ev_name, field_name);
|
||||
}
|
||||
|
||||
static void define_field(enum print_arg_type field_type,
|
||||
static void define_field(enum tep_print_arg_type field_type,
|
||||
const char *ev_name,
|
||||
const char *field_name,
|
||||
const char *delim)
|
||||
|
@ -244,10 +244,10 @@ static void define_field(enum print_arg_type field_type,
|
|||
PyObject *t;
|
||||
unsigned n = 0;
|
||||
|
||||
if (field_type == PRINT_SYMBOL)
|
||||
if (field_type == TEP_PRINT_SYMBOL)
|
||||
handler_name = "define_symbolic_field";
|
||||
|
||||
if (field_type == PRINT_FLAGS)
|
||||
if (field_type == TEP_PRINT_FLAGS)
|
||||
t = PyTuple_New(3);
|
||||
else
|
||||
t = PyTuple_New(2);
|
||||
|
@ -256,7 +256,7 @@ static void define_field(enum print_arg_type field_type,
|
|||
|
||||
PyTuple_SetItem(t, n++, _PyUnicode_FromString(ev_name));
|
||||
PyTuple_SetItem(t, n++, _PyUnicode_FromString(field_name));
|
||||
if (field_type == PRINT_FLAGS)
|
||||
if (field_type == TEP_PRINT_FLAGS)
|
||||
PyTuple_SetItem(t, n++, _PyUnicode_FromString(delim));
|
||||
|
||||
try_call_object(handler_name, t);
|
||||
|
@ -272,46 +272,46 @@ static void define_event_symbols(struct tep_event_format *event,
|
|||
return;
|
||||
|
||||
switch (args->type) {
|
||||
case PRINT_NULL:
|
||||
case TEP_PRINT_NULL:
|
||||
break;
|
||||
case PRINT_ATOM:
|
||||
define_value(PRINT_FLAGS, ev_name, cur_field_name, "0",
|
||||
case TEP_PRINT_ATOM:
|
||||
define_value(TEP_PRINT_FLAGS, ev_name, cur_field_name, "0",
|
||||
args->atom.atom);
|
||||
zero_flag_atom = 0;
|
||||
break;
|
||||
case PRINT_FIELD:
|
||||
case TEP_PRINT_FIELD:
|
||||
free(cur_field_name);
|
||||
cur_field_name = strdup(args->field.name);
|
||||
break;
|
||||
case PRINT_FLAGS:
|
||||
case TEP_PRINT_FLAGS:
|
||||
define_event_symbols(event, ev_name, args->flags.field);
|
||||
define_field(PRINT_FLAGS, ev_name, cur_field_name,
|
||||
define_field(TEP_PRINT_FLAGS, ev_name, cur_field_name,
|
||||
args->flags.delim);
|
||||
define_values(PRINT_FLAGS, args->flags.flags, ev_name,
|
||||
define_values(TEP_PRINT_FLAGS, args->flags.flags, ev_name,
|
||||
cur_field_name);
|
||||
break;
|
||||
case PRINT_SYMBOL:
|
||||
case TEP_PRINT_SYMBOL:
|
||||
define_event_symbols(event, ev_name, args->symbol.field);
|
||||
define_field(PRINT_SYMBOL, ev_name, cur_field_name, NULL);
|
||||
define_values(PRINT_SYMBOL, args->symbol.symbols, ev_name,
|
||||
define_field(TEP_PRINT_SYMBOL, ev_name, cur_field_name, NULL);
|
||||
define_values(TEP_PRINT_SYMBOL, args->symbol.symbols, ev_name,
|
||||
cur_field_name);
|
||||
break;
|
||||
case PRINT_HEX:
|
||||
case PRINT_HEX_STR:
|
||||
case TEP_PRINT_HEX:
|
||||
case TEP_PRINT_HEX_STR:
|
||||
define_event_symbols(event, ev_name, args->hex.field);
|
||||
define_event_symbols(event, ev_name, args->hex.size);
|
||||
break;
|
||||
case PRINT_INT_ARRAY:
|
||||
case TEP_PRINT_INT_ARRAY:
|
||||
define_event_symbols(event, ev_name, args->int_array.field);
|
||||
define_event_symbols(event, ev_name, args->int_array.count);
|
||||
define_event_symbols(event, ev_name, args->int_array.el_size);
|
||||
break;
|
||||
case PRINT_STRING:
|
||||
case TEP_PRINT_STRING:
|
||||
break;
|
||||
case PRINT_TYPE:
|
||||
case TEP_PRINT_TYPE:
|
||||
define_event_symbols(event, ev_name, args->typecast.item);
|
||||
break;
|
||||
case PRINT_OP:
|
||||
case TEP_PRINT_OP:
|
||||
if (strcmp(args->op.op, ":") == 0)
|
||||
zero_flag_atom = 1;
|
||||
define_event_symbols(event, ev_name, args->op.left);
|
||||
|
@ -319,11 +319,11 @@ static void define_event_symbols(struct tep_event_format *event,
|
|||
break;
|
||||
default:
|
||||
/* gcc warns for these? */
|
||||
case PRINT_BSTRING:
|
||||
case PRINT_DYNAMIC_ARRAY:
|
||||
case PRINT_DYNAMIC_ARRAY_LEN:
|
||||
case PRINT_FUNC:
|
||||
case PRINT_BITMASK:
|
||||
case TEP_PRINT_BSTRING:
|
||||
case TEP_PRINT_DYNAMIC_ARRAY:
|
||||
case TEP_PRINT_DYNAMIC_ARRAY_LEN:
|
||||
case TEP_PRINT_FUNC:
|
||||
case TEP_PRINT_BITMASK:
|
||||
/* we should warn... */
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue