[lkml]   [2014]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH v11 0/1] Tracepoint API simplification, text size shrink
Here is v11 of the tracepoint register/unregister API simplification,
submitted for 3.15.

This removes 8.8kB to the size of vmlinux (mostly text).

Changes since v1:
- Adapt ftrace/perf callers,
- Update tracepoint.h macro,
- Build tested.

Changes since v2:
- Introduce for_each_tracepoint() iterator to allow listing the
currently loaded tracepoints, for modules using coming/going
notifiers to track tracepoints.

Changes since v3:
- Introduce module coming and going notifiers each with their own
priority to ensure that other coming notifiers are called after, and
coming notifiers are called before the tracepoint notifiers.
- Fix: move for_each_tracepoint() outside of the CONFIG_MODULE ifdef.

Changes since v4:
- Split tracepoints_mutex into two locks: tp_modlist_mutex, which
protects the tracepoint list of modules, and a tracepoint_mutex, which
protects the tracepoints per se. tracepoint_mutex nests inside
- Introduce a tracepoint module notifier, to ensure consistency between
iteration on tracepoints with for_each_tracepoint() and module coming
and going notifications. This consistency is ensured by holding
tp_modlist_mutex when calling the notifier and when iterating on the
tracepoint module list.

Changes since v5:
- Remove tracepoint_add_old_probes within "Tracepoint cleanup: remove
unused API functions" rather than in later patch.
- Remove struct tp_probes "old probes" list within "Tracepoint cleanup:
remove unused API functions", as it is not needed anymore.
- Within "Tracepoint cleanup: remove unused API functions", simply add
the new module to tail of list, since there is no need to keep it
ordered anymore.

Changes since v6:
- Remove unused struct list_head list from struct tp_probes in patch
"Tracepoint: register/unregister struct tracepoint",
- Rename for_each_tracepoint() to for_each_kernel_tracepoint(). Only
iterate on kernel tracepoints,
- Registered tracepoint module notifiers now receive struct tp_module
pointer rather than struct module pointer,
- register_tracepoint_module_notifier and
unregister_tracepoint_module_notifier now iterate on all modules and
call coming/going notifiers. This ensures notifier registration and
listing of already loaded modules are done atomically (protected by

Changes since v7:
- Coding style updates,
- Shrink size of ftrace/perf struct ftrace_event_call,
- Put back the original tracepoints_mutex name, keep an original comment
layout that goes beyond 80 columns, put back original
tracepoint_module_list name, and rename tp_modlist_mutex to
tracepoint_module_list_mutex, so this patch does not introduce
cosmetic changes to pre-existing code.

Changes since v8:
- Use anonymous union in struct ftrace_event_call,
- Check for NULL call->tp in ftrace_event_get_name().

Changes since v9:
- Fix __TRACE_EVENT_FLAGS() to add flag rather set it. This was
triggering the WARN_ON() safety net added into ftrace_event_reg() by
this patch.

Changes since v10:
- Rename ftrace_event_get_name to ftrace_event_name,
- Add 2 missing call->name to ftrace_event_name(call) changes. Tested
with allyesconfig and allmodconfig along with a temporary field name
swap from name to _name to ensure no other sites are missing.



Mathieu Desnoyers (1):
Tracepoint: register/unregister struct tracepoint

include/linux/ftrace_event.h | 22 +-
include/linux/tracepoint.h | 41 +--
include/trace/ftrace.h | 9 +-
kernel/trace/trace_events.c | 55 ++--
kernel/trace/trace_events_trigger.c | 2 +-
kernel/trace/trace_kprobe.c | 21 +-
kernel/trace/trace_output.c | 2 +-
kernel/trace/trace_uprobe.c | 20 +-
kernel/tracepoint.c | 509 +++++++++++++++--------------------
9 files changed, 330 insertions(+), 351 deletions(-)


 \ /
  Last update: 2014-04-08 23:41    [W:0.045 / U:4.564 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site