projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: notification capture: handle userspace strings
[lttng-modules.git]
/
src
/
lttng-event-notifier-notification.c
diff --git
a/src/lttng-event-notifier-notification.c
b/src/lttng-event-notifier-notification.c
index 0ba566ba9c6810fc79f3d8126121b310dd03a580..054d33393f459832fac3906e81ba634cfe8c41f9 100644
(file)
--- a/
src/lttng-event-notifier-notification.c
+++ b/
src/lttng-event-notifier-notification.c
@@
-283,7
+283,11
@@
int notification_append_capture(
}
break;
case LTTNG_INTERPRETER_TYPE_STRING:
}
break;
case LTTNG_INTERPRETER_TYPE_STRING:
- ret = lttng_msgpack_write_str(writer, output->u.str.str);
+ if (output->u.str.user) {
+ ret = lttng_msgpack_write_user_str(writer, output->u.str.user_str);
+ } else {
+ ret = lttng_msgpack_write_str(writer, output->u.str.str);
+ }
if (ret) {
WARN_ON_ONCE(1);
goto end;
if (ret) {
WARN_ON_ONCE(1);
goto end;
@@
-381,7
+385,7
@@
void notification_send(struct lttng_event_notifier_notification *notif,
struct lttng_kernel_event_notifier *event_notifier)
{
struct lttng_event_notifier_group *event_notifier_group = event_notifier->priv->group;
struct lttng_kernel_event_notifier *event_notifier)
{
struct lttng_event_notifier_group *event_notifier_group = event_notifier->priv->group;
- struct l
ib
_ring_buffer_ctx ctx;
+ struct l
ttng_kernel
_ring_buffer_ctx ctx;
struct lttng_kernel_abi_event_notifier_notification kernel_notif;
size_t capture_buffer_content_len, reserve_size;
int ret;
struct lttng_kernel_abi_event_notifier_notification kernel_notif;
size_t capture_buffer_content_len, reserve_size;
int ret;
@@
-408,18
+412,16
@@
void notification_send(struct lttng_event_notifier_notification *notif,
return;
}
return;
}
- lib_ring_buffer_align_ctx(&ctx, lttng_alignof(kernel_notif));
-
/* Write the notif structure. */
event_notifier_group->ops->event_write(&ctx, &kernel_notif,
/* Write the notif structure. */
event_notifier_group->ops->event_write(&ctx, &kernel_notif,
- sizeof(kernel_notif));
+ sizeof(kernel_notif)
, lttng_alignof(kernel_notif)
);
/*
* Write the capture buffer. No need to realigned as the below is a raw
* char* buffer.
*/
event_notifier_group->ops->event_write(&ctx, ¬if->capture_buf,
/*
* Write the capture buffer. No need to realigned as the below is a raw
* char* buffer.
*/
event_notifier_group->ops->event_write(&ctx, ¬if->capture_buf,
- capture_buffer_content_len);
+ capture_buffer_content_len
, 1
);
event_notifier_group->ops->event_commit(&ctx);
irq_work_queue(&event_notifier_group->wakeup_pending);
event_notifier_group->ops->event_commit(&ctx);
irq_work_queue(&event_notifier_group->wakeup_pending);
@@
-427,7
+429,7
@@
void notification_send(struct lttng_event_notifier_notification *notif,
void lttng_event_notifier_notification_send(struct lttng_kernel_event_notifier *event_notifier,
const char *stack_data,
void lttng_event_notifier_notification_send(struct lttng_kernel_event_notifier *event_notifier,
const char *stack_data,
- struct lttng_probe_ctx *probe_ctx,
+ struct lttng_
kernel_
probe_ctx *probe_ctx,
struct lttng_kernel_notification_ctx *notif_ctx)
{
struct lttng_event_notifier_notification notif = { 0 };
struct lttng_kernel_notification_ctx *notif_ctx)
{
struct lttng_event_notifier_notification notif = { 0 };
This page took
0.030384 seconds
and
4
git commands to generate.