• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/kernel/trace/

Lines Matching refs:call

80 int trace_define_field(struct ftrace_event_call *call, const char *type,
86 if (WARN_ON(!call->class))
89 head = trace_get_fields(call);
118 void trace_destroy_fields(struct ftrace_event_call *call)
123 head = trace_get_fields(call);
132 int trace_event_raw_init(struct ftrace_event_call *call)
136 id = register_ftrace_event(&call->event);
144 int ftrace_event_reg(struct ftrace_event_call *call, enum trace_reg type)
148 return tracepoint_probe_register(call->name,
149 call->class->probe,
150 call);
152 tracepoint_probe_unregister(call->name,
153 call->class->probe,
154 call);
159 return tracepoint_probe_register(call->name,
160 call->class->perf_probe,
161 call);
163 tracepoint_probe_unregister(call->name,
164 call->class->perf_probe,
165 call);
175 struct ftrace_event_call *call;
178 list_for_each_entry(call, &ftrace_events, list) {
179 if (!(call->flags & TRACE_EVENT_FL_ENABLED))
184 call->flags |= TRACE_EVENT_FL_RECORDED_CMD;
187 call->flags &= ~TRACE_EVENT_FL_RECORDED_CMD;
193 static int ftrace_event_enable_disable(struct ftrace_event_call *call,
200 if (call->flags & TRACE_EVENT_FL_ENABLED) {
201 call->flags &= ~TRACE_EVENT_FL_ENABLED;
202 if (call->flags & TRACE_EVENT_FL_RECORDED_CMD) {
204 call->flags &= ~TRACE_EVENT_FL_RECORDED_CMD;
206 call->class->reg(call, TRACE_REG_UNREGISTER);
210 if (!(call->flags & TRACE_EVENT_FL_ENABLED)) {
213 call->flags |= TRACE_EVENT_FL_RECORDED_CMD;
215 ret = call->class->reg(call, TRACE_REG_REGISTER);
219 "%s\n", call->name);
222 call->flags |= TRACE_EVENT_FL_ENABLED;
232 struct ftrace_event_call *call;
235 list_for_each_entry(call, &ftrace_events, list) {
236 ftrace_event_enable_disable(call, 0);
247 struct ftrace_event_call *call;
251 list_for_each_entry(call, &ftrace_events, list) {
253 if (!call->name || !call->class || !call->class->reg)
257 strcmp(match, call->name) != 0 &&
258 strcmp(match, call->class->system) != 0)
261 if (sub && strcmp(sub, call->class->system) != 0)
264 if (event && strcmp(event, call->name) != 0)
267 ftrace_event_enable_disable(call, set);
370 struct ftrace_event_call *call = v;
374 list_for_each_entry_continue(call, &ftrace_events, list) {
379 if (call->class && call->class->reg)
380 return call;
388 struct ftrace_event_call *call;
393 call = list_entry(&ftrace_events, struct ftrace_event_call, list);
395 call = t_next(m, call, &l);
396 if (!call)
399 return call;
405 struct ftrace_event_call *call = v;
409 list_for_each_entry_continue(call, &ftrace_events, list) {
410 if (call->flags & TRACE_EVENT_FL_ENABLED)
411 return call;
419 struct ftrace_event_call *call;
424 call = list_entry(&ftrace_events, struct ftrace_event_call, list);
426 call = s_next(m, call, &l);
427 if (!call)
430 return call;
435 struct ftrace_event_call *call = v;
437 if (strcmp(call->class->system, TRACE_SYSTEM) != 0)
438 seq_printf(m, "%s:", call->class->system);
439 seq_printf(m, "%s\n", call->name);
466 struct ftrace_event_call *call = filp->private_data;
469 if (call->flags & TRACE_EVENT_FL_ENABLED)
481 struct ftrace_event_call *call = filp->private_data;
506 ret = ftrace_event_enable_disable(call, val);
525 struct ftrace_event_call *call;
531 list_for_each_entry(call, &ftrace_events, list) {
532 if (!call->name || !call->class || !call->class->reg)
535 if (system && strcmp(call->class->system, system) != 0)
543 set |= (1 << !!(call->flags & TRACE_EVENT_FL_ENABLED));
608 struct ftrace_event_call *call = m->private;
629 head = trace_get_fields(call);
680 struct ftrace_event_call *call = m->private;
686 seq_printf(m, "name: %s\n", call->name);
687 seq_printf(m, "ID: %d\n", call->event.type);
693 call->print_fmt);
748 struct ftrace_event_call *call = inode->i_private;
757 m->private = call;
765 struct ftrace_event_call *call = filp->private_data;
777 trace_seq_printf(s, "%d\n", call->event.type);
789 struct ftrace_event_call *call = filp->private_data;
802 print_event_filter(call, s);
814 struct ftrace_event_call *call = filp->private_data;
831 err = apply_event_filter(call, buf);
1079 event_create_dir(struct ftrace_event_call *call, struct dentry *d_events,
1092 if (strcmp(call->class->system, TRACE_SYSTEM) != 0)
1093 d_events = event_subsystem_dir(call->class->system, d_events);
1095 call->dir = debugfs_create_dir(call->name, d_events);
1096 if (!call->dir) {
1098 "'%s' directory\n", call->name);
1102 if (call->class->reg)
1103 trace_create_file("enable", 0644, call->dir, call,
1107 if (call->event.type && call->class->reg)
1108 trace_create_file("id", 0444, call->dir, call,
1116 head = trace_get_fields(call);
1118 ret = call->class->define_fields(call);
1121 " events/%s\n", call->name);
1125 trace_create_file("filter", 0644, call->dir, call,
1128 trace_create_file("format", 0444, call->dir, call,
1135 __trace_add_event_call(struct ftrace_event_call *call, struct module *mod,
1145 if (!call->name)
1148 if (call->class->raw_init) {
1149 ret = call->class->raw_init(call);
1153 call->name);
1162 ret = event_create_dir(call, d_events, id, enable, filter, format);
1164 list_add(&call->list, &ftrace_events);
1165 call->mod = mod;
1171 int trace_add_event_call(struct ftrace_event_call *call)
1175 ret = __trace_add_event_call(call, NULL, &ftrace_event_id_fops,
1212 static void __trace_remove_event_call(struct ftrace_event_call *call)
1214 ftrace_event_enable_disable(call, 0);
1215 if (call->event.funcs)
1216 __unregister_ftrace_event(&call->event);
1217 debugfs_remove_recursive(call->dir);
1218 list_del(&call->list);
1219 trace_destroy_fields(call);
1220 destroy_preds(call);
1221 remove_subsystem_dir(call->class->system);
1225 void trace_remove_event_call(struct ftrace_event_call *call)
1229 __trace_remove_event_call(call);
1294 struct ftrace_event_call *call, *start, *end;
1306 for_each_event(call, start, end) {
1307 __trace_add_event_call(call, mod,
1316 struct ftrace_event_call *call, *p;
1320 list_for_each_entry_safe(call, p, &ftrace_events, list) {
1321 if (call->mod == mod) {
1323 __trace_remove_event_call(call);
1394 struct ftrace_event_call *call;
1439 for_each_event(call, __start_ftrace_events, __stop_ftrace_events) {
1440 __trace_add_event_call(call, NULL, &ftrace_event_id_fops,
1523 struct ftrace_event_call *call;
1529 list_for_each_entry(call, &ftrace_events, list) {
1532 if (!call->class || !call->class->probe)
1542 if (call->class->system &&
1543 strcmp(call->class->system, "syscalls") == 0)
1547 pr_info("Testing event %s: ", call->name);
1553 if (call->flags & TRACE_EVENT_FL_ENABLED) {
1559 ftrace_event_enable_disable(call, 1);
1561 ftrace_event_enable_disable(call, 0);