Fix: kernel function event was listed as probe
authorDavid Goulet <dgoulet@efficios.com>
Mon, 25 Mar 2013 19:30:08 +0000 (15:30 -0400)
committerDavid Goulet <dgoulet@efficios.com>
Mon, 25 Mar 2013 19:30:36 +0000 (15:30 -0400)
Fixes #442

Signed-off-by: David Goulet <dgoulet@efficios.com>
src/bin/lttng-sessiond/cmd.c
src/bin/lttng/commands/list.c

index 138a8b87b9f8e086ab3faff27c3892cce8fd7391..0054a6f13ca62d6b89551abbd5a5875e3666d4a6 100644 (file)
@@ -306,8 +306,12 @@ static int list_lttng_kernel_events(char *channel_name,
                case LTTNG_KERNEL_TRACEPOINT:
                        (*events)[i].type = LTTNG_EVENT_TRACEPOINT;
                        break;
-               case LTTNG_KERNEL_KPROBE:
                case LTTNG_KERNEL_KRETPROBE:
+                       (*events)[i].type = LTTNG_EVENT_FUNCTION;
+                       memcpy(&(*events)[i].attr.probe, &event->event->u.kprobe,
+                                       sizeof(struct lttng_kernel_kprobe));
+                       break;
+               case LTTNG_KERNEL_KPROBE:
                        (*events)[i].type = LTTNG_EVENT_PROBE;
                        memcpy(&(*events)[i].attr.probe, &event->event->u.kprobe,
                                        sizeof(struct lttng_kernel_kprobe));
index 7006e8e101a7f2080c331ce8f91517762c5cec0e..4df363d6baab06b233854cc332459d1f47b1ec00 100644 (file)
@@ -220,6 +220,17 @@ static void print_events(struct lttng_event *event)
                }
                break;
        }
+       case LTTNG_EVENT_FUNCTION:
+               MSG("%s%s (type: function)%s%s", indent6,
+                               event->name, enabled_string(event->enabled),
+                               filter_string(event->filter));
+               if (event->attr.probe.addr != 0) {
+                       MSG("%saddr: 0x%" PRIx64, indent8, event->attr.probe.addr);
+               } else {
+                       MSG("%soffset: 0x%" PRIx64, indent8, event->attr.probe.offset);
+                       MSG("%ssymbol: %s", indent8, event->attr.probe.symbol_name);
+               }
+               break;
        case LTTNG_EVENT_PROBE:
                MSG("%s%s (type: probe)%s%s", indent6,
                                event->name, enabled_string(event->enabled),
@@ -231,7 +242,6 @@ static void print_events(struct lttng_event *event)
                        MSG("%ssymbol: %s", indent8, event->attr.probe.symbol_name);
                }
                break;
-       case LTTNG_EVENT_FUNCTION:
        case LTTNG_EVENT_FUNCTION_ENTRY:
                MSG("%s%s (type: function)%s%s", indent6,
                                event->name, enabled_string(event->enabled),
This page took 0.031093 seconds and 4 git commands to generate.