summaryrefslogtreecommitdiff
path: root/samples
diff options
context:
space:
mode:
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>2011-03-16 19:04:29 -0400
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>2011-03-16 19:04:29 -0400
commit29f552b77e4b67e3f40f2b508289fd4a72adf03e (patch)
tree450f1abdf718206f3a621a7e27ab2d00bd180da2 /samples
parentfa1cc6aa284a3bae836b009e3816619852672834 (diff)
lttng-instrumentation/markers-examples-api-update
Markers examples API update Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Diffstat (limited to 'samples')
-rw-r--r--samples/markers/marker-example.c4
-rw-r--r--samples/markers/probe-example.c10
-rw-r--r--samples/markers/test-multi.c4
3 files changed, 10 insertions, 8 deletions
diff --git a/samples/markers/marker-example.c b/samples/markers/marker-example.c
index e9cd9c0bc84..06afde47631 100644
--- a/samples/markers/marker-example.c
+++ b/samples/markers/marker-example.c
@@ -19,10 +19,10 @@ static int my_open(struct inode *inode, struct file *file)
{
int i;
- trace_mark(subsystem_event, "integer %d string %s", 123,
+ trace_mark(samples, subsystem_event, "integer %d string %s", 123,
"example string");
for (i = 0; i < 10; i++)
- trace_mark(subsystem_eventb, MARK_NOARGS);
+ trace_mark(samples, subsystem_eventb, MARK_NOARGS);
return -EPERM;
}
diff --git a/samples/markers/probe-example.c b/samples/markers/probe-example.c
index 2dfb3b32937..204c779e547 100644
--- a/samples/markers/probe-example.c
+++ b/samples/markers/probe-example.c
@@ -20,7 +20,8 @@ struct probe_data {
marker_probe_func *probe_func;
};
-void probe_subsystem_event(void *probe_data, void *call_data,
+void probe_subsystem_event(const struct marker *mdata,
+ void *probe_data, void *call_data,
const char *format, va_list *args)
{
/* Declare args */
@@ -39,7 +40,8 @@ void probe_subsystem_event(void *probe_data, void *call_data,
atomic_t eventb_count = ATOMIC_INIT(0);
-void probe_subsystem_eventb(void *probe_data, void *call_data,
+void probe_subsystem_eventb(const struct marker *mdata,
+ void *probe_data, void *call_data,
const char *format, va_list *args)
{
/* Increment counter */
@@ -62,7 +64,7 @@ static int __init probe_init(void)
int i;
for (i = 0; i < ARRAY_SIZE(probe_array); i++) {
- result = marker_probe_register(probe_array[i].name,
+ result = marker_probe_register("samples", probe_array[i].name,
probe_array[i].format,
probe_array[i].probe_func, &probe_array[i]);
if (result)
@@ -77,7 +79,7 @@ static void __exit probe_fini(void)
int i;
for (i = 0; i < ARRAY_SIZE(probe_array); i++)
- marker_probe_unregister(probe_array[i].name,
+ marker_probe_unregister("samples", probe_array[i].name,
probe_array[i].probe_func, &probe_array[i]);
printk(KERN_INFO "Number of event b : %u\n",
atomic_read(&eventb_count));
diff --git a/samples/markers/test-multi.c b/samples/markers/test-multi.c
index 98fb03cfd93..9f62d2921b8 100644
--- a/samples/markers/test-multi.c
+++ b/samples/markers/test-multi.c
@@ -81,7 +81,7 @@ static int __init probe_init(void)
int i;
for (i = 0; i < ARRAY_SIZE(probe_array); i++) {
- result = marker_probe_register(probe_array[i].name,
+ result = marker_probe_register("samples", probe_array[i].name,
probe_array[i].format,
probe_array[i].probe_func, (void*)(long)i);
if (result)
@@ -97,7 +97,7 @@ static void __exit probe_fini(void)
int i;
for (i = 0; i < ARRAY_SIZE(probe_array); i++) {
- result = marker_probe_unregister(probe_array[i].name,
+ result = marker_probe_unregister("samples", probe_array[i].name,
probe_array[i].probe_func, (void*)(long)i);
if (result)
printk(KERN_INFO "Unable to unregister probe %s\n",