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:08 +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 80834941d9c278e181d129e9959489a518c4d938..38ce83c7eefd308cc8b6e2f1b50abddbc5bedf9c 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 6677e4c4e1401767821cf62942b1ce146f3683c4..b7c2b6c2263cdae040bedd6ccc4e4527ff47fdd2 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.029191 seconds and 4 git commands to generate.