diff options
author | Ray Kinsella <mdr@ashroe.eu> | 2021-09-30 15:15:32 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-10-05 10:44:39 +0000 |
commit | ede7143386ce1cf086066eec06dbdf7cf6d4cfee (patch) | |
tree | 9e6aad9d33551c9abf8813b52f449d0919f849d0 /src/plugins/perfmon/perfmon.c | |
parent | 4189108e1dbac0a7961d31d59a21b7fe8354ce61 (diff) |
perfmon: bundles with multiple types
Allow perfmon bundles to support more than one bundle type, either node
or thread. Only used for topdown bundle for the moment.
Type: improvement
Signed-off-by: Ray Kinsella <mdr@ashroe.eu>
Change-Id: Iba3653a4deb39b0a8ee8ad448a7e8f954283ccd8
Diffstat (limited to 'src/plugins/perfmon/perfmon.c')
-rw-r--r-- | src/plugins/perfmon/perfmon.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/plugins/perfmon/perfmon.c b/src/plugins/perfmon/perfmon.c index 46c8cf9ca04..8abce94910f 100644 --- a/src/plugins/perfmon/perfmon.c +++ b/src/plugins/perfmon/perfmon.c @@ -97,7 +97,7 @@ perfmon_set (vlib_main_t *vm, perfmon_bundle_t *b) s = b->src; ASSERT (b->n_events); - if (b->type == PERFMON_BUNDLE_TYPE_NODE) + if (b->active_type == PERFMON_BUNDLE_TYPE_NODE) is_node = 1; if (s->instances_by_type == 0) @@ -236,7 +236,7 @@ perfmon_start (vlib_main_t *vm, perfmon_bundle_t *b) return clib_error_return_unix (0, "ioctl(PERF_EVENT_IOC_ENABLE)"); } } - if (b->type == PERFMON_BUNDLE_TYPE_NODE) + if (b->active_type == PERFMON_BUNDLE_TYPE_NODE) { vlib_node_function_t *funcs[PERFMON_OFFSET_TYPE_MAX]; @@ -267,7 +267,7 @@ perfmon_stop (vlib_main_t *vm) if (pm->is_running != 1) return clib_error_return (0, "not running"); - if (pm->active_bundle->type == PERFMON_BUNDLE_TYPE_NODE) + if (pm->active_bundle->active_type == PERFMON_BUNDLE_TYPE_NODE) { for (int i = 0; i < vlib_get_n_threads (); i++) vlib_node_set_dispatch_wrapper (vlib_get_main_by_index (i), 0); |