[lttng-dev] [PATCH 14/15] lttng: remove task_prio wrapper
Mathieu Desnoyers
mathieu.desnoyers at efficios.com
Wed Nov 30 13:34:27 EST 2011
Use the newly exported task_prio symbol.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers at efficios.com>
---
drivers/staging/lttng/lttng-context-prio.c | 23 +----------------------
1 files changed, 1 insertions(+), 22 deletions(-)
diff --git a/drivers/staging/lttng/lttng-context-prio.c b/drivers/staging/lttng/lttng-context-prio.c
index f4f64de..9d46ba0 100644
--- a/drivers/staging/lttng/lttng-context-prio.c
+++ b/drivers/staging/lttng/lttng-context-prio.c
@@ -12,23 +12,9 @@
#include <linux/sched.h>
#include "ltt-events.h"
#include "wrapper/ringbuffer/frontend_types.h"
-#include "wrapper/kallsyms.h"
#include "ltt-tracer.h"
static
-int (*wrapper_task_prio_sym)(struct task_struct *t);
-
-int wrapper_task_prio_init(void)
-{
- wrapper_task_prio_sym = (void *) kallsyms_lookup_funcptr("task_prio");
- if (!wrapper_task_prio_sym) {
- printk(KERN_WARNING "LTTng: task_prio symbol lookup failed.\n");
- return -EINVAL;
- }
- return 0;
-}
-
-static
size_t prio_get_size(size_t offset)
{
size_t size = 0;
@@ -45,7 +31,7 @@ void prio_record(struct lttng_ctx_field *field,
{
int prio;
- prio = wrapper_task_prio_sym(current);
+ prio = task_prio(current);
lib_ring_buffer_align_ctx(ctx, ltt_alignof(prio));
chan->ops->event_write(ctx, &prio, sizeof(prio));
}
@@ -53,13 +39,6 @@ void prio_record(struct lttng_ctx_field *field,
int lttng_add_prio_to_ctx(struct lttng_ctx **ctx)
{
struct lttng_ctx_field *field;
- int ret;
-
- if (!wrapper_task_prio_sym) {
- ret = wrapper_task_prio_init();
- if (ret)
- return ret;
- }
field = lttng_append_context(ctx);
if (!field)
--
1.7.5.4
More information about the lttng-dev
mailing list