History

tracing: Adding new functions for kernel access to Ftrace instances

Adding 2 new functions - 1) struct trace_array *trace_array_get_by_name(const char *name); Return pointer to a trace array with given name. If it does not exist, create and return pointer to the new trace array. 2) int trace_array_set_clr_event(struct trace_array *tr, const char *system ,const char *event, bool enable); Enable/Disable events to this trace array. Additionally, - To handle reference counters, export trace_array_put() - Due to introduction of the above 2 new functions, we no longer need to export - ftrace_set_clr_event & trace_array_create APIs. Link: http://lkml.kernel.org/r/1574276919-11119-2-git-send-email-divya.indi@oracle.com

Divya Indi committed 6 years ago

Commit 28879781 parent fc809bc5 files · +106 −24Browse files

Showing the changes to include/linux (2 of 5 files). Show all

Unified · Split

2 files
  1. include/linux/trace.h +2 −1
  2. include/linux/trace_events.h +2 −1
include/linux/trace.h+2−1
@@ -29,7 +29,8 @@ struct trace_array; · 28 unmodified lines
2929 void trace_printk_init_buffers(void);
3030 int trace_array_printk(struct trace_array *tr, unsigned long ip,
3131 const char *fmt, ...);
32−struct trace_array *trace_array_create(const char *name);
32+void trace_array_put(struct trace_array *tr);
33+struct trace_array *trace_array_get_by_name(const char *name);
3334 int trace_array_destroy(struct trace_array *tr);
3435 #endif /* CONFIG_TRACING */
3536
include/linux/trace_events.h+2−1
@@ -555,7 +555,8 @@ extern int trace_event_get_offsets(struct trace_event_call *call); · 554 unmodified lines
555555
556556 int ftrace_set_clr_event(struct trace_array *tr, char *buf, int set);
557557 int trace_set_clr_event(const char *system, const char *event, int set);
558−
558+int trace_array_set_clr_event(struct trace_array *tr, const char *system,
559+ const char *event, bool enable);
559560 /*
560561 * The double __builtin_constant_p is because gcc will give us an error
561562 * if we try to allocate the static variable to fmt if it is not a

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t