aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYordan Karadzhov (VMware) <y.karadz@gmail.com>2021-02-11 12:31:43 +0200
committerYordan Karadzhov (VMware) <y.karadz@gmail.com>2021-02-16 10:25:14 +0200
commit7b8e70b1b1f128c59b735688833a829291de4337 (patch)
tree20ea68cefc50d05f35b528559a80425dc1606d5f
parent540c46c34f97490b0148c933b819ef9ff860b728 (diff)
downloadkernel-shark-7b8e70b1b1f128c59b735688833a829291de4337.tar.gz
kernel-shark: Count the number of readout interfaces
The number of readout interfaces, successfully registered by the plugins is supposed to be counted and stored in the session context object. Although this is not used by the GUI, we want the API to support this feature. Link: https://lore.kernel.org/linux-trace-devel/<20210211103205.418588-6-y.karadz@gmail.com> Sgned-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
-rw-r--r--src/libkshark-plugin.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libkshark-plugin.c b/src/libkshark-plugin.c
index bc681869..ebd2579e 100644
--- a/src/libkshark-plugin.c
+++ b/src/libkshark-plugin.c
@@ -457,6 +457,7 @@ kshark_register_input(struct kshark_context *kshark_ctx,
input->interface = plugin;
input->next = kshark_ctx->inputs;
kshark_ctx->inputs = input;
+ kshark_ctx->n_inputs++;
return input;
conflict:
@@ -489,6 +490,7 @@ void kshark_unregister_input(struct kshark_context *kshark_ctx,
*last = this_input->next;
free(this_input);
+ kshark_ctx->n_inputs--;
return;
}