filter: bytecode already in the list should go before
[lttng-modules.git] / lttng-filter.c
index 45319d6f0ef7a0ccd60270d21e50d77a77cc1d71..6ff6be8f2a6888b4ecd7a61bce8ef25ff9830738 100644 (file)
@@ -510,11 +510,12 @@ void lttng_enabler_event_link_bytecode(struct lttng_event *event,
 
                /*
                 * Insert at specified priority (seqnum) in increasing
-                * order.
+                * order. If there already is a bytecode of the same priority,
+                * insert the new bytecode right after it.
                 */
                list_for_each_entry_reverse(runtime,
                                &event->bytecode_runtime_head, node) {
-                       if (runtime->bc->bc.seqnum < bc->bc.seqnum) {
+                       if (runtime->bc->bc.seqnum <= bc->bc.seqnum) {
                                /* insert here */
                                insert_loc = &runtime->node;
                                goto add_within;
This page took 0.023268 seconds and 4 git commands to generate.