projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
LTTng metadata fix
[lttng-modules.git]
/
ltt-debugfs-abi.c
diff --git
a/ltt-debugfs-abi.c
b/ltt-debugfs-abi.c
index a889378f95ae8f22403558ab713857c9cfb3c585..046fca43cc4ee987ff2ee59a42d19296e0e7b190 100644
(file)
--- a/
ltt-debugfs-abi.c
+++ b/
ltt-debugfs-abi.c
@@
-142,6
+142,10
@@
static
void lttng_metadata_create_events(struct file *channel_file)
{
struct ltt_channel *channel = channel_file->private_data;
void lttng_metadata_create_events(struct file *channel_file)
{
struct ltt_channel *channel = channel_file->private_data;
+ static struct lttng_kernel_event metadata_params = {
+ .instrumentation = LTTNG_KERNEL_TRACEPOINTS,
+ .name = "lttng_metadata",
+ };
char *event_name = "lttng_metadata";
struct ltt_event *event;
int ret;
char *event_name = "lttng_metadata";
struct ltt_event *event;
int ret;
@@
-150,8
+154,7
@@
void lttng_metadata_create_events(struct file *channel_file)
* We tolerate no failure path after event creation. It will stay
* invariant for the rest of the session.
*/
* We tolerate no failure path after event creation. It will stay
* invariant for the rest of the session.
*/
- event = ltt_event_create(channel, event_name, LTTNG_KERNEL_TRACEPOINTS,
- NULL);
+ event = ltt_event_create(channel, event_name, &metadata_params, NULL);
if (!event) {
goto create_error;
ret = -EEXIST;
if (!event) {
goto create_error;
ret = -EEXIST;
@@
-222,8
+225,8
@@
int lttng_abi_create_channel(struct file *session_file,
chan_file->private_data = chan;
fd_install(chan_fd, chan_file);
if (channel_type == METADATA_CHANNEL) {
chan_file->private_data = chan;
fd_install(chan_fd, chan_file);
if (channel_type == METADATA_CHANNEL) {
- lttng_metadata_create_events(chan_file);
session->metadata = chan;
session->metadata = chan;
+ lttng_metadata_create_events(chan_file);
}
/* The channel created holds a reference on the session */
}
/* The channel created holds a reference on the session */
@@
-531,10
+534,8
@@
int lttng_event_release(struct inode *inode, struct file *file)
{
struct ltt_event *event = file->private_data;
{
struct ltt_event *event = file->private_data;
- if (event) {
- ltt_event_unregister(event);
+ if (event)
fput(event->chan->file);
fput(event->chan->file);
- }
return 0;
}
return 0;
}
This page took
0.036625 seconds
and
4
git commands to generate.