From 05e0559ecaff29d65a478e85addef12cf9d1a81b Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Thu, 31 Dec 2009 17:16:18 -0500 Subject: trace-cmd: Add plugin_kmem for showing function names of call sites The kmem events only show a useless hex symbol for the call site name. This adds a plugin to do a lookup of the function name and still print the rest of the event format. Also adds pevent_find_function_address() to let the plugin show the offset into the function as well. Signed-off-by: Steven Rostedt --- Makefile | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 1bcc153..6e9be83 100644 --- a/Makefile +++ b/Makefile @@ -9,8 +9,10 @@ LIBS = -L. -ltracecmd -ldl %.o: %.c $(CC) -c $(CFLAGS) $(EXT) $(INCLUDES) $< -o $@ -TARGETS = libparsevent.a libtracecmd.a trace-cmd plugin_hrtimer.so plugin_mac80211.so \ - plugin_sched_switch.so +PLUGINS = plugin_hrtimer.so plugin_mac80211.so plugin_sched_switch.so \ + plugin_kmem.so + +TARGETS = libparsevent.a libtracecmd.a trace-cmd $(PLUGINS) all: $(TARGETS) @@ -65,19 +67,25 @@ libtracecmd.so: $(TCMD_LIB_OBJS) libtracecmd.a: $(TCMD_LIB_OBJS) $(RM) $@; $(AR) rcs $@ $^ -plugin_hrtimer.o: plugin_hrtimer.c parse-events.h +plugin_hrtimer.o: plugin_hrtimer.c parse-events.h trace-cmd.h $(CC) -c $(CFLAGS) -fPIC -o $@ $< plugin_hrtimer.so: plugin_hrtimer.o $(CC) -shared -nostartfiles -o $@ $< -plugin_sched_switch.o: plugin_sched_switch.c parse-events.h +plugin_kmem.o: plugin_kmem.c parse-events.h trace-cmd.h + $(CC) -c $(CFLAGS) -fPIC -o $@ $< + +plugin_kmem.so: plugin_kmem.o + $(CC) -shared -nostartfiles -o $@ $< + +plugin_sched_switch.o: plugin_sched_switch.c parse-events.h trace-cmd.h $(CC) -c $(CFLAGS) -fPIC -o $@ $< plugin_sched_switch.so: plugin_sched_switch.o $(CC) -shared -nostartfiles -o $@ $< -plugin_mac80211.o: plugin_mac80211.c parse-events.h +plugin_mac80211.o: plugin_mac80211.c parse-events.h trace-cmd.h $(CC) -c $(CFLAGS) -fPIC -o $@ $< plugin_mac80211.so: plugin_mac80211.o -- cgit v1.2.2