Lines Matching defs:tp

308 static void tracepoint_update_call(struct tracepoint *tp, struct tracepoint_func *tp_funcs)
310 void *func = tp->iterator;
313 if (!tp->static_call_key)
317 __static_call_update(tp->static_call_key, tp->static_call_tramp, func);
323 static int tracepoint_add_func(struct tracepoint *tp,
330 if (tp->regfunc && !static_key_enabled(&tp->key)) {
331 ret = tp->regfunc();
336 tp_funcs = rcu_dereference_protected(tp->funcs,
358 tracepoint_update_call(tp, tp_funcs);
359 /* Both iterator and static call handle NULL tp->funcs */
360 rcu_assign_pointer(tp->funcs, tp_funcs);
361 static_key_enable(&tp->key);
365 tracepoint_update_call(tp, tp_funcs);
367 * Iterator callback installed before updating tp->funcs.
373 rcu_assign_pointer(tp->funcs, tp_funcs);
396 static int tracepoint_remove_func(struct tracepoint *tp,
401 tp_funcs = rcu_dereference_protected(tp->funcs,
414 if (tp->unregfunc && static_key_enabled(&tp->key))
415 tp->unregfunc();
417 static_key_disable(&tp->key);
419 tracepoint_update_call(tp, tp_funcs);
420 /* Both iterator and static call handle NULL tp->funcs */
421 rcu_assign_pointer(tp->funcs, NULL);
429 rcu_assign_pointer(tp->funcs, tp_funcs);
441 tracepoint_update_call(tp, tp_funcs);
446 rcu_assign_pointer(tp->funcs, tp_funcs);
464 * @tp: tracepoint
472 int tracepoint_probe_register_prio_may_exist(struct tracepoint *tp, void *probe,
482 ret = tracepoint_add_func(tp, &tp_func, prio, false);
490 * @tp: tracepoint
496 * Note: if @tp is within a module, the caller is responsible for
501 int tracepoint_probe_register_prio(struct tracepoint *tp, void *probe,
511 ret = tracepoint_add_func(tp, &tp_func, prio, true);
519 * @tp: tracepoint
524 * Note: if @tp is within a module, the caller is responsible for
529 int tracepoint_probe_register(struct tracepoint *tp, void *probe, void *data)
531 return tracepoint_probe_register_prio(tp, probe, data, TRACEPOINT_DEFAULT_PRIO);
537 * @tp: tracepoint
543 int tracepoint_probe_unregister(struct tracepoint *tp, void *probe, void *data)
551 ret = tracepoint_remove_func(tp, &tp_func);
559 void (*fct)(struct tracepoint *tp, void *priv),
635 static void tp_module_going_check_quiescent(struct tracepoint *tp, void *priv)
637 WARN_ON_ONCE(tp->funcs);
745 void for_each_kernel_tracepoint(void (*fct)(struct tracepoint *tp, void *priv),