projects
/
lttng-modules.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use LTTNG_KERNEL_* namespace for exported header
[lttng-modules.git]
/
ltt-debugfs-abi.c
diff --git
a/ltt-debugfs-abi.c
b/ltt-debugfs-abi.c
index 0f649fc2af4bd10682949be82408cce0b7191ec9..41b9f8fa55d7108a01290ec37bab95b3a4d14f7d 100644
(file)
--- a/
ltt-debugfs-abi.c
+++ b/
ltt-debugfs-abi.c
@@
-91,7
+91,7
@@
fd_error:
* @arg: command arg
*
* This ioctl implements lttng commands:
* @arg: command arg
*
* This ioctl implements lttng commands:
- * LTTNG_SESSION
+ * LTTNG_
KERNEL_
SESSION
* Returns a LTTng trace session file descriptor
*
* The returned session will be deleted when its file descriptor is closed.
* Returns a LTTng trace session file descriptor
*
* The returned session will be deleted when its file descriptor is closed.
@@
-100,7
+100,7
@@
static
long lttng_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
switch (cmd) {
long lttng_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
switch (cmd) {
- case LTTNG_SESSION:
+ case LTTNG_
KERNEL_
SESSION:
return lttng_abi_create_session();
default:
return -ENOIOCTLCMD;
return lttng_abi_create_session();
default:
return -ENOIOCTLCMD;
@@
-123,7
+123,7
@@
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;
- char *event_name = "lttng
-
metadata";
+ char *event_name = "lttng
_
metadata";
const struct lttng_event_desc *event_desc;
struct ltt_event *event;
int ret;
const struct lttng_event_desc *event_desc;
struct ltt_event *event;
int ret;
@@
-137,7
+137,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,
INSTRUM
_TRACEPOINTS,
+ event = ltt_event_create(channel, event_name,
LTTNG_KERNEL
_TRACEPOINTS,
event_desc, NULL);
if (!event) {
goto create_error;
event_desc, NULL);
if (!event) {
goto create_error;
@@
-154,7
+154,7
@@
get_error:
static
int lttng_abi_create_channel(struct file *session_file,
static
int lttng_abi_create_channel(struct file *session_file,
- struct lttng_channel __user *uchan_param,
+ struct lttng_
kernel_
channel __user *uchan_param,
enum channel_type channel_type)
{
struct ltt_session *session = session_file->private_data;
enum channel_type channel_type)
{
struct ltt_session *session = session_file->private_data;
@@
-162,7
+162,7
@@
int lttng_abi_create_channel(struct file *session_file,
const char *transport_name;
struct ltt_channel *chan;
struct file *chan_file;
const char *transport_name;
struct ltt_channel *chan;
struct file *chan_file;
- struct lttng_channel chan_param;
+ struct lttng_
kernel_
channel chan_param;
int chan_fd;
int ret = 0;
int chan_fd;
int ret = 0;
@@
-210,8
+210,10
@@
int lttng_abi_create_channel(struct file *session_file,
chan->file = chan_file;
chan_file->private_data = chan;
fd_install(chan_fd, chan_file);
chan->file = chan_file;
chan_file->private_data = chan;
fd_install(chan_fd, chan_file);
- if (channel_type == METADATA_CHANNEL)
+ if (channel_type == METADATA_CHANNEL)
{
lttng_metadata_create_events(chan_file);
lttng_metadata_create_events(chan_file);
+ session->metadata = chan;
+ }
/* The channel created holds a reference on the session */
atomic_long_inc(&session_file->f_count);
/* The channel created holds a reference on the session */
atomic_long_inc(&session_file->f_count);
@@
-234,7
+236,7
@@
fd_error:
* @arg: command arg
*
* This ioctl implements lttng commands:
* @arg: command arg
*
* This ioctl implements lttng commands:
- * LTTNG_CHANNEL
+ * LTTNG_
KERNEL_
CHANNEL
* Returns a LTTng channel file descriptor
*
* The returned channel will be deleted when its file descriptor is closed.
* Returns a LTTng channel file descriptor
*
* The returned channel will be deleted when its file descriptor is closed.
@@
-245,17
+247,17
@@
long lttng_session_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
struct ltt_session *session = file->private_data;
switch (cmd) {
struct ltt_session *session = file->private_data;
switch (cmd) {
- case LTTNG_CHANNEL:
+ case LTTNG_
KERNEL_
CHANNEL:
return lttng_abi_create_channel(file,
return lttng_abi_create_channel(file,
- (struct lttng_
channel __user *)
arg,
+ (struct lttng_
kernel_channel __user *)
arg,
PER_CPU_CHANNEL);
PER_CPU_CHANNEL);
- case LTTNG_SESSION_START:
+ case LTTNG_
KERNEL_
SESSION_START:
return ltt_session_start(session);
return ltt_session_start(session);
- case LTTNG_SESSION_STOP:
+ case LTTNG_
KERNEL_
SESSION_STOP:
return ltt_session_stop(session);
return ltt_session_stop(session);
- case LTTNG_METADATA:
+ case LTTNG_
KERNEL_
METADATA:
return lttng_abi_create_channel(file,
return lttng_abi_create_channel(file,
- (struct lttng_
channel __user *)
arg,
+ (struct lttng_
kernel_channel __user *)
arg,
METADATA_CHANNEL);
default:
return -ENOIOCTLCMD;
METADATA_CHANNEL);
default:
return -ENOIOCTLCMD;
@@
-335,13
+337,13
@@
fd_error:
static
int lttng_abi_create_event(struct file *channel_file,
static
int lttng_abi_create_event(struct file *channel_file,
- struct lttng_event __user *uevent_param)
+ struct lttng_
kernel_
event __user *uevent_param)
{
struct ltt_channel *channel = channel_file->private_data;
const struct lttng_event_desc *event_desc;
struct ltt_event *event;
char *event_name;
{
struct ltt_channel *channel = channel_file->private_data;
const struct lttng_event_desc *event_desc;
struct ltt_event *event;
char *event_name;
- struct lttng_event event_param;
+ struct lttng_
kernel_
event event_param;
int event_fd, ret;
struct file *event_file;
int event_fd, ret;
struct file *event_file;
@@
-377,7
+379,7
@@
int lttng_abi_create_event(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, event_param.i
type
,
+ event = ltt_event_create(channel, event_name, event_param.i
nstrumentation
,
event_desc, NULL);
if (!event) {
goto event_error;
event_desc, NULL);
if (!event) {
goto event_error;
@@
-410,10
+412,10
@@
name_error:
* @arg: command arg
*
* This ioctl implements lttng commands:
* @arg: command arg
*
* This ioctl implements lttng commands:
- * LTTNG_STREAM
+ * LTTNG_
KERNEL_
STREAM
* Returns an event stream file descriptor or failure.
* (typically, one event stream records events from one CPU)
* Returns an event stream file descriptor or failure.
* (typically, one event stream records events from one CPU)
- * LTTNG_EVENT
+ * LTTNG_
KERNEL_
EVENT
* Returns an event file descriptor or failure.
*
* Channel and event file descriptors also hold a reference on the session.
* Returns an event file descriptor or failure.
*
* Channel and event file descriptors also hold a reference on the session.
@@
-422,10
+424,10
@@
static
long lttng_channel_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
switch (cmd) {
long lttng_channel_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
switch (cmd) {
- case LTTNG_STREAM:
+ case LTTNG_
KERNEL_
STREAM:
return lttng_abi_open_stream(file);
return lttng_abi_open_stream(file);
- case LTTNG_EVENT:
- return lttng_abi_create_event(file, (struct lttng_
event __user *)
arg);
+ case LTTNG_
KERNEL_
EVENT:
+ return lttng_abi_create_event(file, (struct lttng_
kernel_event __user *)
arg);
default:
return -ENOIOCTLCMD;
}
default:
return -ENOIOCTLCMD;
}
@@
-439,7
+441,7
@@
long lttng_channel_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
* @arg: command arg
*
* This ioctl implements lttng commands:
* @arg: command arg
*
* This ioctl implements lttng commands:
- * LTTNG_STREAM
+ * LTTNG_
KERNEL_
STREAM
* Returns an event stream file descriptor or failure.
*
* Channel and event file descriptors also hold a reference on the session.
* Returns an event stream file descriptor or failure.
*
* Channel and event file descriptors also hold a reference on the session.
@@
-448,7
+450,7
@@
static
long lttng_metadata_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
switch (cmd) {
long lttng_metadata_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
switch (cmd) {
- case LTTNG_STREAM:
+ case LTTNG_
KERNEL_
STREAM:
return lttng_abi_open_stream(file);
default:
return -ENOIOCTLCMD;
return lttng_abi_open_stream(file);
default:
return -ENOIOCTLCMD;
@@
-518,8
+520,10
@@
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)
+ if (event) {
+ ltt_event_unregister(event);
fput(event->chan->file);
fput(event->chan->file);
+ }
return 0;
}
return 0;
}
This page took
0.028402 seconds
and
4
git commands to generate.