projects
/
deliverable
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: net instrumentation for kernels 2.6.39 and below
[deliverable/lttng-modules.git]
/
lttng-context-pid.c
diff --git
a/lttng-context-pid.c
b/lttng-context-pid.c
index 36712591a1c08114f493de5a7a801efe3722877c..3211819d082097596e3802aa5c1620987c1162b7 100644
(file)
--- a/
lttng-context-pid.c
+++ b/
lttng-context-pid.c
@@
-50,6
+50,13
@@
void pid_record(struct lttng_ctx_field *field,
chan->ops->event_write(ctx, &pid, sizeof(pid));
}
chan->ops->event_write(ctx, &pid, sizeof(pid));
}
+static
+void pid_get_value(struct lttng_ctx_field *field,
+ union lttng_ctx_value *value)
+{
+ value->s64 = task_tgid_nr(current);
+}
+
int lttng_add_pid_to_ctx(struct lttng_ctx **ctx)
{
struct lttng_ctx_field *field;
int lttng_add_pid_to_ctx(struct lttng_ctx **ctx)
{
struct lttng_ctx_field *field;
@@
-71,6
+78,8
@@
int lttng_add_pid_to_ctx(struct lttng_ctx **ctx)
field->event_field.type.u.basic.integer.encoding = lttng_encode_none;
field->get_size = pid_get_size;
field->record = pid_record;
field->event_field.type.u.basic.integer.encoding = lttng_encode_none;
field->get_size = pid_get_size;
field->record = pid_record;
+ field->get_value = pid_get_value;
+ lttng_context_update(*ctx);
wrapper_vmalloc_sync_all();
return 0;
}
wrapper_vmalloc_sync_all();
return 0;
}
This page took
0.023742 seconds
and
5
git commands to generate.