Tzvetomir Stoyanov (VMware)
9334c9616b
tools lib traceevent: Add prefix tep_ to structs filter_type and event_filter
...
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 adds prefix tep_ to
structs filter_type and event_filter
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/20180919185724.309837130@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-09-19 17:28:28 -03:00
Tzvetomir Stoyanov (VMware)
88e6c21a11
tools lib traceevent: Add prefix tep_ to various structs filter_arg_*.
...
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 adds prefix tep_ to
to various structs filter_arg_*..
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/20180919185724.152948543@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-09-19 17:27:52 -03:00
Tzvetomir Stoyanov (VMware)
0515ca53ca
tools lib traceevent: Add prefix tep_ to struct filter_{arg,value_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 adds prefix tep_ to
struct filter_arg, enum filter_value_type and all enum's 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.972818215@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-09-19 17:22:29 -03:00
Tzvetomir Stoyanov (VMware)
4746d22a4c
tools lib traceevent: Add prefix tep_ to enums filter_{exp,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 adds prefix tep_ to enums
filter_exp_type, filter_arg_type and all enum's 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.824559046@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-09-19 17:20:51 -03:00
Tzvetomir Stoyanov (VMware)
e906bb788f
tools lib traceevent: Add prefix tep_ to enums filter_{boolean,op,cmp}_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 adds prefix tep_ to enums
filter_boolean_type, filter_op_type, filter_cmp_type and all enum's 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.680572508@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-09-19 17:19:44 -03:00
Tzvetomir Stoyanov (VMware)
1e97216f20
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 >
2018-09-19 17:17:44 -03:00
Tzvetomir Stoyanov (VMware)
5647f94b90
tools lib traceevent, perf tools: Add prefix tep_ to all print_* structures
...
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 adds prefix tep_ to all
print_* structures
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.381753268@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-09-19 17:16:34 -03:00
Tzvetomir Stoyanov (VMware)
c1953bcc73
tools lib traceevent: Add prefix TEP_ to all EVENT_FL_* 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 adds prefix TEP_
to all members of nameless enum EVENT_FL_*
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.116643250@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-09-19 17:15:40 -03:00
Tzvetomir Stoyanov (VMware)
f25d9e09e9
tools lib traceevent: Rename enum event_{sort_}type to enum tep_event_{sort_}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 event_type to
enum tep_event_type, enum event_sort_type to enum tep_event_sort_type
and add prefix TEP_ to all enum's 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.961022207@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-09-19 17:14:58 -03:00
Tzvetomir Stoyanov (VMware)
bb39ccb204
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 >
2018-09-19 17:14:13 -03:00
Tzvetomir Stoyanov (VMware)
2c92f9828b
tools lib traceevent, perf tools: Rename struct format{_field} to struct tep_format{_field}
...
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 struct format to
struct tep_format and struct format_field to struct tep_format_field
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.661319373@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-09-19 17:13:15 -03:00
Tzvetomir Stoyanov (VMware)
4963b0f88b
tools lib traceevent, perf tools: Rename struct event_format to struct tep_event_format
...
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 struct event_format
to struct tep_event_format
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.495820809@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-09-19 17:11:50 -03:00
Tzvetomir Stoyanov (VMware)
266b851cc2
tools lib traceevent, perf tools: Split trace-seq related APIs in a separate header file
...
In order to make libtraceevent into a proper library, all its APIs
should be defined in corresponding header files. This patch splits
trace-seq related APIs in a separate header file: trace-seq.h
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Namhyung Kim <namhyung@kernel.org >
Link: http://lkml.kernel.org/r/20180828185038.2dcb2743@gandalf.local.home
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-30 15:52:20 -03:00
Steven Rostedt (VMware)
6ab025ed44
tools lib traceevent: Change to SPDX License format
...
Replace the GPL text with SPDX tags in the tools/lib/traceevent files.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Cc: Jiri Olsa <jolsa@redhat.com >
Cc: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com >
Cc: Yordan Karadzhov (VMware) <y.karadz@gmail.com >
Cc: linux-trace-devel@vger.kernel.org
Link: http://lkml.kernel.org/r/20180816111015.125e0f25@gandalf.local.home
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-20 08:54:58 -03:00
Tzvetomir Stoyanov (VMware)
0ae98637b6
tools lib traceevent: Rename static variables and functions in event-parse.c
...
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
static variables and functions in event-parse.c: pevent_func_params,
__pevent_parse_format, __pevent_parse_event, pevent_error_str, pevent_search_event
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/20180808180703.575392642@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:37:26 -03:00
Tzvetomir Stoyanov (VMware)
c99eeaf549
tools lib traceevent: Rename various pevent 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_reset_function_resolver, pevent_strerror, pevent_list_events,
pevent_event_common_fields, pevent_event_fields, pevent_ref, pevent_unref
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/20180808180703.426198047@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:36:43 -03:00
Tzvetomir Stoyanov (VMware)
1634e4604c
tools lib traceevent: Rename internal parser related 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_buffer_init, pevent_read_token, pevent_free_token,
pevent_peek_char, pevent_get_input_buf, pevent_get_input_buf_ptr
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/20180808180703.275281085@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:35:58 -03:00
Tzvetomir Stoyanov (VMware)
413af01c8d
tools lib traceevent: Rename various pevent get/set/is 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_pid_is_registered, pevent_get_cpus, pevent_set_cpus,
pevent_is_file_bigendian, pevent_is_host_bigendian, pevent_is_latency_format,
pevent_set_latency_format
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/20180808180703.114110715@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:35:02 -03:00
Tzvetomir Stoyanov (VMware)
610e1e4ff0
tools lib traceevent: Rename pevent_find_* 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_find_function, pevent_find_function_address,
pevent_find_event_by_name, pevent_find_event_by_record
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.966965051@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:31:28 -03:00
Tzvetomir Stoyanov (VMware)
8b3e08722e
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 >
2018-08-13 15:30:30 -03:00
Tzvetomir Stoyanov (VMware)
dc05ebf373
tools lib traceevent: Rename pevent_data_ 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_data_lat_fmt, pevent_data_type, pevent_data_event_from_type,
pevent_data_pid, pevent_data_preempt_count, pevent_data_flags,
pevent_data_comm_from_pid, pevent_data_pid_from_comm, pevent_cmdline_pid
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.678020020@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:28:36 -03:00
Tzvetomir Stoyanov (VMware)
b843e9c3a2
tools lib traceevent: Rename pevent_register / unregister 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_register_print_function, pevent_unregister_print_function,
pevent_register_event_handler, pevent_unregister_event_handler,
pevent_register_function, pevent_register_trace_clock
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
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.524813185@goodmis.org
Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:27:35 -03:00
Tzvetomir Stoyanov (VMware)
64e2379069
tools lib traceevent: Rename pevent_filter* 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_FILTER_ERROR_BUFSZ, pevent_filter_alloc,
pevent_filter_add_filter_str, pevent_filter_match, pevent_filter_strerror,
pevent_event_filtered, pevent_filter_reset, pevent_filter_clear_trivial,
pevent_filter_free, pevent_filter_make_string, pevent_filter_remove_event,
pevent_filter_event_has_trivial, pevent_filter_copy, pevent_update_trivial,
pevent_filter_compare
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.370659353@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:26:31 -03:00
Tzvetomir Stoyanov (VMware)
ca2921dd90
tools lib traceevent, perf tools: Rename traceevent_plugin_* 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 "traceevent_". This changes
APIs: traceevent_plugin_list_options, traceevent_plugin_free_options_list,
traceevent_plugin_add_options, traceevent_plugin_remove_options,
traceevent_print_plugins
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.089951638@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:25:36 -03:00
Tzvetomir Stoyanov (VMware)
3cf477836e
tools lib traceevent: Rename pevent_function* 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_function_handler, pevent_func_handler,
pevent_func_arg_type, PEVENT_FUNC_ARG_VOID, PEVENT_FUNC_ARG_INT,
PEVENT_FUNC_ARG_LONG, PEVENT_FUNC_ARG_STRING, PEVENT_FUNC_ARG_PTRS,
PEVENT_FUNC_ARG_MAX_TYPES
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/20180808180701.935881193@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:24:26 -03:00
Tzvetomir Stoyanov (VMware)
d97f4ef177
tools lib traceevent, tools lib lockdep: Rename 'enum pevent_errno' to 'enum tep_errno'
...
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
'enum pevent_errno' to 'enum tep_errno'.
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/20180808180701.770475059@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:23:07 -03:00
Tzvetomir Stoyanov (VMware)
6fed932e92
tools lib traceevent, perf tools: Rename 'enum pevent_flag' to 'enum tep_flag'
...
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
pevent_get_page_size API and enum pevent_flag to enum tep_flag
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/20180808180701.623942406@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:22:18 -03:00
Tzvetomir Stoyanov (VMware)
fc9b69710e
tools lib traceevent, perf tools: Rename traceevent_* 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 "traceevent_". This
changes APIs: traceevent_host_bigendian, traceevent_load_plugins and
traceevent_unload_plugins
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/20180808180701.484691639@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:22:16 -03:00
Tzvetomir Stoyanov (VMware)
ece2a4f483
tools lib traceevent, perf tools: Rename pevent_set_* 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_set_file_bigendian, pevent_set_flag,
pevent_set_function_resolver, pevent_set_host_bigendian,
pevent_set_long_size, pevent_set_page_size and pevent_get_long_size
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/20180808180701.256265951@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:22:10 -03:00
Tzvetomir Stoyanov (VMware)
13a418904e
tools lib traceevent, perf tools: Rename pevent_register_* 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_register_comm, pevent_register_print_string
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/20180808180700.948980691@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:22:08 -03:00
Tzvetomir Stoyanov (VMware)
59c1baee25
tools lib traceevent, perf tools: Rename pevent_read_number_* 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_read_number, pevent_read_number_field
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/20180808180700.804271434@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:22:05 -03:00
Tzvetomir Stoyanov (VMware)
6a48dc298e
tools lib traceevent, perf tools: Rename pevent print 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_print_field, pevent_print_fields, pevent_print_funcs,
pevent_print_printk
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/20180808180700.654453763@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:22:01 -03:00
Tzvetomir Stoyanov (VMware)
c60167c187
tools lib traceevent, perf tools: Rename pevent parse 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_parse_event, pevent_parse_format, pevent_parse_header_page
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/20180808180700.469749700@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:21:57 -03:00
Tzvetomir Stoyanov (VMware)
af85cd1952
tools lib traceevent, perf tools: Rename pevent find 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_find_any_field, pevent_find_common_field,
pevent_find_event, pevent_find_field
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/20180808180700.316995920@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:21:51 -03:00
Tzvetomir Stoyanov (VMware)
4d5c58b15c
tools lib traceevent, perf tools: Rename pevent alloc / free 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_alloc, pevent_free, pevent_event_info and pevent_func_resolver_t
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/20180808180700.152609945@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:21:43 -03:00
Tzvetomir Stoyanov (VMware)
c32d52b464
tools lib traceevent, perf tools: Rename pevent plugin related 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
the pevent plugin related API.
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/20180808180700.005287044@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:21:39 -03:00
Tzvetomir Stoyanov (VMware)
cbc49b25b9
tools lib traceevent, perf tools: Rename 'struct pevent_record' to 'struct tep_record'
...
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
the 'struct pevent_record' to 'struct tep_record'.
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/20180808180659.866021298@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-13 15:21:13 -03:00
Tzvetomir Stoyanov (VMware)
096177a8b5
tools lib traceevent, perf tools: Rename struct pevent to struct tep_handle
...
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
the struct pevent to struct tep_handle.
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/20180808180659.706175783@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-08-10 15:29:35 -03:00
Steven Rostedt (VMware)
d777f8de99
tools lib traceevent: Fix get_field_str() for dynamic strings
...
If a field is a dynamic string, get_field_str() returned just the
offset/size value and not the string. Have it parse the offset/size
correctly to return the actual string. Otherwise filtering fails when
trying to filter fields that are dynamic strings.
Reported-by: Gopanapalli Pradeep <prap_hai@yahoo.com >
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Acked-by: Namhyung Kim <namhyung@kernel.org >
Cc: Andrew Morton <akpm@linux-foundation.org >
Link: http://lkml.kernel.org/r/20180112004823.146333275@goodmis.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-01-17 10:23:21 -03:00
Taeung Song
806efaed3c
tools lib traceevent: Fix missing break in FALSE case of pevent_filter_clear_trivial()
...
Currently the FILTER_TRIVIAL_FALSE case has a missing break statement,
if the trivial type is FALSE, it will also run into the TRUE case, and
always be skipped as the TRUE statement will continue the loop on the
inverse condition of the FALSE statement.
Reported-by: Namhyung Kim <namhyung@kernel.org >
Acked-by: Namhyung Kim <namhyung@kernel.org >
Signed-off-by: Taeung Song <treeze.taeung@gmail.com >
Cc: Andrew Morton <akpm@linux-foundation.org >
Link: http://lkml.kernel.org/r/20180112004823.012918807@goodmis.org
Link: http://lkml.kernel.org/r/1493218540-12296-1-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-01-17 10:22:57 -03:00
Michael Sartain
6d36ce2616
tools lib traceevent: Add UL suffix to MISSING_EVENTS
...
Add UL suffix to MISSING_EVENTS since ints shouldn't be left shifted by 31.
Signed-off-by: Michael Sartain <mikesart@fastmail.com >
Acked-by: Namhyung Kim <namhyung@kernel.org >
Cc: Andrew Morton <akpm@linux-foundation.org >
Link: http://lkml.kernel.org/r/20171016165542.13038-4-mikesart@fastmail.com
Link: http://lkml.kernel.org/r/20180112004822.829533885@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-01-17 10:22:49 -03:00
Federico Vaga
67dfc376f3
tools lib traceevent: Use asprintf when possible
...
It makes the code clearer and less error prone.
clearer:
- less code
- the code is now using the same format to create strings dynamically
less error prone:
- no magic number +2 +9 +5 to compute the size
- no copy&paste of the strings to compute the size and to concatenate
The function `asprintf` is not POSIX standard but the program
was already using it. Later it can be decided to use only POSIX
functions, then we can easly replace all the `asprintf(3)` with a local
implementation of that function.
Signed-off-by: Federico Vaga <federico.vaga@vaga.pv.it >
Acked-by: Namhyung Kim <namhyung@kernel.org >
Cc: Andrew Morton <akpm@linux-foundation.org >
Cc: Federico Vaga <federico.vaga@vaga.pv.it >
Link: http://lkml.kernel.org/r/20170802221558.9684-2-federico.vaga@vaga.pv.it
Link: http://lkml.kernel.org/r/20180112004822.686281649@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-01-17 10:22:19 -03:00
Steven Rostedt (VMware)
e877372880
tools lib traceevent: Show contents (in hex) of data of unrecognized type records
...
When a record has an unrecognized type, an error message is reported,
but it would also be helpful to see the contents of that record. At
least show what it is in hex, instead of just showing a blank line.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Acked-by: Namhyung Kim <namhyung@kernel.org >
Cc: Andrew Morton <akpm@linux-foundation.org >
Link: http://lkml.kernel.org/r/20180112004822.542204577@goodmis.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-01-17 10:22:13 -03:00
Steven Rostedt (VMware)
37db96bb49
tools lib traceevent: Handle new pointer processing of bprint strings
...
The Linux kernel printf() has some extended use cases that dereference
the pointer. This is dangerouse for tracing because the pointer that is
dereferenced can change or even be unmapped. It also causes issues when
the trace data is extracted, because user space does not have access to
the contents of the pointer even if it still exists.
To handle this, the kernel was updated to process these dereferenced
pointers at the time they are recorded, and not post processed. Now they
exist in the tracing buffer, and no dereference is needed at the time of
reading the trace.
The event parsing library needs to handle this new case.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Acked-by: Namhyung Kim <namhyung@kernel.org >
Cc: Andrew Morton <akpm@linux-foundation.org >
Link: http://lkml.kernel.org/r/20180112004822.403349289@goodmis.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-01-17 10:22:08 -03:00
Steven Rostedt (VMware)
38d70b7ca1
tools lib traceevent: Simplify pointer print logic and fix %pF
...
When processing %pX in pretty_print(), simplify the logic slightly by
incrementing the ptr to the format string if isalnum(ptr[1]) is true.
This follows the logic a bit more closely to what is in the kernel.
Also, this fixes a small bug where %pF was not giving the offset of the
function.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Acked-by: Namhyung Kim <namhyung@kernel.org >
Cc: Andrew Morton <akpm@linux-foundation.org >
Link: http://lkml.kernel.org/r/20180112004822.260262257@goodmis.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-01-17 10:22:03 -03:00
Jan Kiszka
d63444739b
tools lib traceevent: Print value of unknown symbolic fields
...
Aligns trace-cmd with the behavior of the kernel.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com >
Acked-by: Namhyung Kim <namhyung@kernel.org >
Cc: Andrew Morton <akpm@linux-foundation.org >
Link: http://lkml.kernel.org/r/e60c889f-55e7-4ee8-0e50-151e435ffd8c@siemens.com
Link: http://lkml.kernel.org/r/20180112004822.118332436@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-01-17 10:21:57 -03:00
Steven Rostedt (VMware)
3df76c9a81
tools lib traceevent: Show value of flags that have not been parsed
...
If the value contains bits that are not defined by print_flags() helper,
then show the remaining bits. This aligns with the functionality of the
kernel.
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Acked-by: Namhyung Kim <namhyung@kernel.org >
Cc: Andrew Morton <akpm@linux-foundation.org >
Link: http://lkml.kernel.org/r/e60c889f-55e7-4ee8-0e50-151e435ffd8c@siemens.com
Link: http://lkml.kernel.org/r/20180112004821.976225232@goodmis.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-01-17 10:21:45 -03:00
Michael Sartain
952a99ccfa
tools lib traceevent: Fix bad force_token escape sequence
...
Older kernels have a bug that creates invalid symbols. event-parse.c
handles them by replacing them with a "%s" token. But the fix included
an extra backslash, and "\%s" was added incorrectly.
Signed-off-by: Michael Sartain <mikesart@fastmail.com >
Acked-by: Namhyung Kim <namhyung@kernel.org >
Cc: Andrew Morton <akpm@linux-foundation.org >
Link: http://lkml.kernel.org/r/20180112004821.827168881@goodmis.org
Link: http://lkml.kernel.org/r/d320000d37c10ce0912851e1fb78d1e0c946bcd9.1497486273.git.mikesart@fastmail.com
Signed-off-by: Steven Rostedt <rostedt@goodmis.org >
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com >
2018-01-17 10:21:39 -03:00
Cheng Jian
e4795e3bb7
tools/lib/traceevent/parse-filter.c: clean up clang build warning
...
The uniform structure filter_arg sets its union based on the difference
of enum filter_arg_type, However, some functions use implicit type
conversion obviously.
warning: implicit conversion from enumeration type 'enum filter_exp_type'
to different enumeration type 'enum filter_op_type'
warning: implicit conversion from enumeration type 'enum filter_cmp_type'
to different enumeration type 'enum filter_exp_type'
Link: http://lkml.kernel.org/r/1509938415-113825-1-git-send-email-cj.chengjian@huawei.com
Signed-off-by: Cheng Jian <cj.chengjian@huawei.com >
Cc: Kate Stewart <kstewart@linuxfoundation.org >
Cc: Xie XiuQi <xiexiuqi@huawei.com >
Cc: Li Bin <huawei.libin@huawei.com >
Cc: Steven Rostedt (Red Hat) <rostedt@goodmis.org >
Signed-off-by: Andrew Morton <akpm@linux-foundation.org >
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org >
2017-11-17 16:10:02 -08:00
Greg Kroah-Hartman
b24413180f
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
...
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org >
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com >
Reviewed-by: Thomas Gleixner <tglx@linutronix.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2017-11-02 11:10:55 +01:00