|
@@ -598,6 +598,14 @@ static struct notifier_block trace_kprobe_module_nb = {
|
|
.priority = 1 /* Invoked after kprobe module callback */
|
|
.priority = 1 /* Invoked after kprobe module callback */
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+/* Convert certain expected symbols into '_' when generating event names */
|
|
|
|
+static inline void sanitize_event_name(char *name)
|
|
|
|
+{
|
|
|
|
+ while (*name++ != '\0')
|
|
|
|
+ if (*name == ':' || *name == '.')
|
|
|
|
+ *name = '_';
|
|
|
|
+}
|
|
|
|
+
|
|
static int create_trace_kprobe(int argc, char **argv)
|
|
static int create_trace_kprobe(int argc, char **argv)
|
|
{
|
|
{
|
|
/*
|
|
/*
|
|
@@ -740,6 +748,7 @@ static int create_trace_kprobe(int argc, char **argv)
|
|
else
|
|
else
|
|
snprintf(buf, MAX_EVENT_NAME_LEN, "%c_0x%p",
|
|
snprintf(buf, MAX_EVENT_NAME_LEN, "%c_0x%p",
|
|
is_return ? 'r' : 'p', addr);
|
|
is_return ? 'r' : 'p', addr);
|
|
|
|
+ sanitize_event_name(buf);
|
|
event = buf;
|
|
event = buf;
|
|
}
|
|
}
|
|
tk = alloc_trace_kprobe(group, event, addr, symbol, offset, maxactive,
|
|
tk = alloc_trace_kprobe(group, event, addr, symbol, offset, maxactive,
|