X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=src%2Flib%2Fcounter%2Fcounter.c;h=bf038aacd3b54f55bd6ad6a58b9325e24074600d;hb=c190d76e8c7b44d62b3651ab845b765c1b1f8104;hp=a4500a0ea4af9ede4457b19fdb8e50a2551bfc63;hpb=ffcc873470121ef1ebb110df3d9038a38d9cb7cb;p=lttng-modules.git diff --git a/src/lib/counter/counter.c b/src/lib/counter/counter.c index a4500a0e..bf038aac 100644 --- a/src/lib/counter/counter.c +++ b/src/lib/counter/counter.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -324,7 +325,8 @@ int lttng_counter_aggregate(const struct lib_counter_config *config, *underflow = false; switch (config->alloc) { - case COUNTER_ALLOC_GLOBAL: /* Fallthrough */ + case COUNTER_ALLOC_GLOBAL: + lttng_fallthrough; case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: /* Read global counter. */ ret = lttng_counter_read(config, counter, dimension_indexes, @@ -342,7 +344,8 @@ int lttng_counter_aggregate(const struct lib_counter_config *config, switch (config->alloc) { case COUNTER_ALLOC_GLOBAL: break; - case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: /* Fallthrough */ + case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: + lttng_fallthrough; case COUNTER_ALLOC_PER_CPU: //TODO: integrate with CPU hotplug and online cpus for (cpu = 0; cpu < num_possible_cpus(); cpu++) { @@ -448,7 +451,8 @@ int lttng_counter_clear(const struct lib_counter_config *config, int cpu, ret; switch (config->alloc) { - case COUNTER_ALLOC_GLOBAL: /* Fallthrough */ + case COUNTER_ALLOC_GLOBAL: + lttng_fallthrough; case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: /* Clear global counter. */ ret = lttng_counter_clear_cpu(config, counter, dimension_indexes, -1); @@ -462,7 +466,8 @@ int lttng_counter_clear(const struct lib_counter_config *config, switch (config->alloc) { case COUNTER_ALLOC_GLOBAL: break; - case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: /* Fallthrough */ + case COUNTER_ALLOC_PER_CPU | COUNTER_ALLOC_GLOBAL: + lttng_fallthrough; case COUNTER_ALLOC_PER_CPU: //TODO: integrate with CPU hotplug and online cpus for (cpu = 0; cpu < num_possible_cpus(); cpu++) {