lttng-tools.git
12 years agoFix missing value
David Goulet [Fri, 15 Jul 2011 23:53:09 +0000 (19:53 -0400)] 
Fix missing value

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd locking for all session data structure
David Goulet [Fri, 15 Jul 2011 23:11:07 +0000 (19:11 -0400)] 
Add locking for all session data structure

The session daemon is single threaded when processing client command
however the CPU hotplug thread was introduced and uses a lot of session
data structure that are now protected by pthread mutex with this commit.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd CPU hotplug support
David Goulet [Thu, 14 Jul 2011 17:19:49 +0000 (13:19 -0400)] 
Add CPU hotplug support

This introduce a new thread to the session daemon that poll() on all
channel's fd for an event which indicate a new CPU.

If an even is catched, new streams are created for all channels of all
tracing sessions and kernel consumers are updated.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoRemove useless kernel session counter
David Goulet [Fri, 15 Jul 2011 20:27:42 +0000 (16:27 -0400)] 
Remove useless kernel session counter

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoRemove dependency on libuuid
David Goulet [Fri, 15 Jul 2011 20:22:13 +0000 (16:22 -0400)] 
Remove dependency on libuuid

The session name is unique across all sessions so no need to use UUIDs
from libuuid anymore.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix locking dependency problem
Julien Desfossez [Fri, 15 Jul 2011 19:05:00 +0000 (15:05 -0400)] 
Fix locking dependency problem

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
12 years agokconsumerd: signals should only set flag and write into pipe (part 1)
Mathieu Desnoyers [Thu, 14 Jul 2011 22:02:13 +0000 (18:02 -0400)] 
kconsumerd: signals should only set flag and write into pipe (part 1)

Simplify signal reception. Left todo.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoLocking fix.
Mathieu Desnoyers [Thu, 14 Jul 2011 21:31:19 +0000 (17:31 -0400)] 
Locking fix.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix mutex unprotected list
David Goulet [Thu, 14 Jul 2011 20:13:45 +0000 (16:13 -0400)] 
Fix mutex unprotected list

Reported-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd a check for duplicate session fd
David Goulet [Thu, 14 Jul 2011 20:01:37 +0000 (16:01 -0400)] 
Add a check for duplicate session fd

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
12 years agoParse kprobe options with enable-event
David Goulet [Thu, 7 Jul 2011 18:26:02 +0000 (14:26 -0400)] 
Parse kprobe options with enable-event

Address or offset can be specified in base 8 (beginning with 0), base 10
and base 16 (beginning with 0x).

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
12 years agoAdd new kernel consumer name to gitignore
David Goulet [Thu, 7 Jul 2011 17:36:28 +0000 (13:36 -0400)] 
Add new kernel consumer name to gitignore

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
12 years agoRename kconsumerd to ltt-kconsumerd
Julien Desfossez [Thu, 7 Jul 2011 15:11:38 +0000 (11:11 -0400)] 
Rename kconsumerd to ltt-kconsumerd

Avoid the confusion with a kernel thread in the process list.

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoCreate a library for the kernel consumer
Julien Desfossez [Thu, 7 Jul 2011 15:11:37 +0000 (11:11 -0400)] 
Create a library for the kernel consumer

Kconsumerd functionnalities has been extracted to a library to allow
external tools to implement the kernel consumer functions.
Kconsumerd is now a daemon using the library, everything works as
before for this particular case.

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix segfault on free() pointer
David Goulet [Thu, 7 Jul 2011 15:18:01 +0000 (11:18 -0400)] 
Fix segfault on free() pointer

Reported-by: Julien Desfossez <julien.desfossez@polymtl.ca>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd list-commands and list-options to lttng ui
Simon Marchi [Wed, 6 Jul 2011 13:25:42 +0000 (09:25 -0400)] 
Add list-commands and list-options to lttng ui

Those commands are mostly for bash auto completion and does not require
heavy parsing for that matter.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd detection of debugfs and kernel module loading
David Goulet [Thu, 7 Jul 2011 14:29:19 +0000 (10:29 -0400)] 
Add detection of debugfs and kernel module loading

The session daemon now detects the path of the debugfs mount point or
create and mount it at a default location (/mnt/debugfs).

Then, the kernel module are loaded automatically, if present, and the
kernel tracer fd is opened at the previous detected debugfs path.

The kernel module list is hardcoded for now.

NOTE: There is no module unload at the session daemon cleanup. This is
to avoid removing tracing capabilities when a trace is ongoing and
written to disk.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoRemove unused header file
David Goulet [Thu, 7 Jul 2011 13:53:12 +0000 (09:53 -0400)] 
Remove unused header file

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoDisable user-space tracer control
David Goulet [Thu, 7 Jul 2011 13:52:07 +0000 (09:52 -0400)] 
Disable user-space tracer control

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix missing tracing group when UID=0
David Goulet [Wed, 6 Jul 2011 18:02:21 +0000 (14:02 -0400)] 
Fix missing tracing group when UID=0

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoChange configuration file and trace output dir
David Goulet [Wed, 6 Jul 2011 17:47:37 +0000 (13:47 -0400)] 
Change configuration file and trace output dir

The configuration file containing the session name information is now at
the HOME location and named ".lttngrc".

The trace output directory is now at the HOME location and named
"lttng-traces" containing the traces of each sessions identified by the
top level directory called "session_name-date-time".

Also fix the metadata's path that was pointing to the old default path
in /tmp/lttng.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd set session command to lttng cli
David Goulet [Thu, 30 Jun 2011 21:20:06 +0000 (17:20 -0400)] 
Add set session command to lttng cli

This command change the session name in the config file of the config
directory (.lttng).

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd session name option to all command
David Goulet [Thu, 30 Jun 2011 20:53:59 +0000 (16:53 -0400)] 
Add session name option to all command

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoOverwrite the config file on create session
David Goulet [Thu, 30 Jun 2011 20:39:33 +0000 (16:39 -0400)] 
Overwrite the config file on create session

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoDon't remove the config directory on destroy
David Goulet [Thu, 30 Jun 2011 20:33:04 +0000 (16:33 -0400)] 
Don't remove the config directory on destroy

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoImprove trace output path and config path
David Goulet [Thu, 30 Jun 2011 19:39:59 +0000 (15:39 -0400)] 
Improve trace output path and config path

Now, the default config directory is placed in the home directory and
the trace output directory is set inside that config directory with name
being the session name with date and time.

Add get home functio to utils.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix comments spacing
David Goulet [Thu, 30 Jun 2011 16:34:57 +0000 (12:34 -0400)] 
Fix comments spacing

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd utils.c and recursive mkdir function
David Goulet [Thu, 30 Jun 2011 16:20:03 +0000 (12:20 -0400)] 
Add utils.c and recursive mkdir function

This fixes the channel path that was wrong. Each channel has now it's
own trace name file using the channel name.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agodefault channel selection cleanup
Mathieu Desnoyers [Thu, 30 Jun 2011 15:18:23 +0000 (11:18 -0400)] 
default channel selection cleanup

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agolttng.h cleanup
Mathieu Desnoyers [Thu, 30 Jun 2011 15:10:35 +0000 (11:10 -0400)] 
lttng.h cleanup

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoConsume with mmap if enabled
Julien Desfossez [Wed, 29 Jun 2011 21:03:24 +0000 (17:03 -0400)] 
Consume with mmap if enabled

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
12 years agoAdd channel output method selection
Julien Desfossez [Wed, 29 Jun 2011 21:03:23 +0000 (17:03 -0400)] 
Add channel output method selection

Sync with kernel code to select the output mode between splice and mmap.
Splice remains the default method.

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
12 years agoFix infinite loop when enabling all events
David Goulet [Wed, 29 Jun 2011 22:07:12 +0000 (18:07 -0400)] 
Fix infinite loop when enabling all events

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix possible null pointer
David Goulet [Wed, 29 Jun 2011 22:05:06 +0000 (18:05 -0400)] 
Fix possible null pointer

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd kernel context support
David Goulet [Wed, 29 Jun 2011 21:23:26 +0000 (17:23 -0400)] 
Add kernel context support

At this point, all context types and perf IDs are hardcoded in the usage
function of the add-context command. Future works will remove them and
port them into the code tree.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd disable kernel channel support
David Goulet [Wed, 29 Jun 2011 18:47:18 +0000 (14:47 -0400)] 
Add disable kernel channel support

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd enable kernel channel support
David Goulet [Wed, 29 Jun 2011 18:21:21 +0000 (14:21 -0400)] 
Add enable kernel channel support

Fix a null pointer dereference in the kernel session teardown.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd disable all support and fix enable all
David Goulet [Wed, 29 Jun 2011 17:56:29 +0000 (13:56 -0400)] 
Add disable all support and fix enable all

Disable all kernel events support.

Fix the enable all kernel events that was not doing the right thing
considering the previous changes in the latest commits.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd enable kernel event using the enable ioctl
David Goulet [Wed, 29 Jun 2011 17:27:09 +0000 (13:27 -0400)] 
Add enable kernel event using the enable ioctl

Two helper functions are added which are get an event by name and a
channel by name.

The disable and enable event command was modified to use these two
functions.

Overall, it's now possible to enable/disable at will kernel events.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix comment
David Goulet [Wed, 29 Jun 2011 16:49:50 +0000 (12:49 -0400)] 
Fix comment

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd disable kernel event support
David Goulet [Wed, 29 Jun 2011 16:48:35 +0000 (12:48 -0400)] 
Add disable kernel event support

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd FD_CLOEXEC option to all anonymous FDs
David Goulet [Mon, 27 Jun 2011 20:36:27 +0000 (16:36 -0400)] 
Add FD_CLOEXEC option to all anonymous FDs

Upon execlp() some anonymous file descriptors from the kernel tracer
could be dup and thus making the refcount always > 1 on the lttng kernel
tracer side.

Acked-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix possible error on close
David Goulet [Mon, 27 Jun 2011 20:36:22 +0000 (16:36 -0400)] 
Fix possible error on close

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoRename and add missing header file
David Goulet [Mon, 27 Jun 2011 19:21:45 +0000 (15:21 -0400)] 
Rename and add missing header file

Rename config.c/.h to conf.* to avoid confusion with the autogenerated
config.h from autoconf.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd kernel context ioctl
David Goulet [Mon, 27 Jun 2011 19:19:31 +0000 (15:19 -0400)] 
Add kernel context ioctl

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoMajor changes
David Goulet [Wed, 15 Jun 2011 21:29:58 +0000 (17:29 -0400)] 
Major changes

ltt-sessiond
-------------

Change command type to add the LTTNG_ prefix. Only kernel command at
this point working with the new kernel tracer lttng 2.0.

Adds support for the default channel.

Kernel tracer session, metadata and streams opening are now handled by
the session daemon by removing the public commands for those options.
This means that the public API of lttng-tools DO NOT permit to control
these three actions anymore.

Adds ulimit setting for open files (65535) for sessiond running as
UID=0.

lttng.h
-------------

As mention before, create_session, create_stream and open_metadata is
removed from the public API.

UUIDs are not exposed anymore by the API. Everything is done with the
session name.

New lttng event structure added in order to support kernel tracepoints,
kprobes and function tracer.

New lttng channel structure to create a kernel channel. Add the lttng
channel attribute structure also where to put the channel attributes.

libkernelctl
-------------

Adds flush buffer function and wait quiescent for kernel tracer.

Uses the new enable/disable kernel ioctl that replaces create event.

lttng
-------------

*MAJOR*: This is the inital import of the git-alike UI.

Some features are still not implemented but all the basics and more are
there.

This commit introduce a new feature where the session name is kept in
the current directory where the create command was executed (or
specified by the user with --path). A .lttng directory is created and a
config file that contains, for now, the session name. So, in order to
apply command on a session, you either specify it on the command line or
go in the directory where your .lttng dir reside.

A lot of code was changed/added/removed from all over the lttng-tools
tree to fit this big change. Consider this commit to be an almost
complete rewrite of the original git command line UI and a big part of
the public API.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix message argument type
Mathieu Desnoyers [Fri, 24 Jun 2011 01:04:13 +0000 (21:04 -0400)] 
Fix message argument type

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoFix mkdir error handling
David Goulet [Tue, 14 Jun 2011 19:51:13 +0000 (15:51 -0400)] 
Fix mkdir error handling

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoRemove unneeded liburcu symbol check
Mathieu Desnoyers [Fri, 10 Jun 2011 22:26:49 +0000 (18:26 -0400)] 
Remove unneeded liburcu symbol check

synchronize_rcu symbol is going away with userspace rcu 0.6. lttng-tools
is not using this library directly anyway, just the list header provided
by urcu. Therefore only check for the list header.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoInternal librairies not being installed anymore
David Goulet [Fri, 10 Jun 2011 16:12:10 +0000 (12:12 -0400)] 
Internal librairies not being installed anymore

Signed-off-by: David Goulet <dgoulet@ev0ke.net>
12 years agoAdd lttng-cli.txt RFC
Mathieu Desnoyers [Wed, 8 Jun 2011 21:54:18 +0000 (17:54 -0400)] 
Add lttng-cli.txt RFC

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
12 years agoInitial import of libustctl and libustcomm
David Goulet [Wed, 8 Jun 2011 18:06:40 +0000 (14:06 -0400)] 
Initial import of libustctl and libustcomm

Import and clean the libustctl and libustcomm code from the UST git
tree. This import is done at the ust git head commit:
161239e0409832d65cb773a08d364b29945b18a7

Small modifications was needed but nothing major in the API and basic
functionnalities.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix wrong include file name in Makefile.am
David Goulet [Wed, 8 Jun 2011 16:33:52 +0000 (12:33 -0400)] 
Fix wrong include file name in Makefile.am

Fix the line and comment it out so that lttng.h is not being installed
at this moment because of heavy development and possible API breakage.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd TODOs for session daemon
David Goulet [Thu, 2 Jun 2011 19:01:45 +0000 (15:01 -0400)] 
Add TODOs for session daemon

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd kernel tracer check on kernel command
David Goulet [Thu, 2 Jun 2011 18:41:41 +0000 (14:41 -0400)] 
Add kernel tracer check on kernel command

Check again at each kernel command for the kernel tracer. If the module
get loaded AFTER the session daemon, kernel tracing will be available.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agokconsumerd execlp set to verbose for debug
David Goulet [Thu, 2 Jun 2011 17:23:22 +0000 (13:23 -0400)] 
kconsumerd execlp set to verbose for debug

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoClose client socket in sessiond
David Goulet [Thu, 2 Jun 2011 17:22:40 +0000 (13:22 -0400)] 
Close client socket in sessiond

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agokconsumerd dying when sessiond shutdown cmd socket
David Goulet [Thu, 2 Jun 2011 17:20:05 +0000 (13:20 -0400)] 
kconsumerd dying when sessiond shutdown cmd socket

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoCore modification and listing kernel event support
David Goulet [Wed, 1 Jun 2011 21:10:45 +0000 (17:10 -0400)] 
Core modification and listing kernel event support

File descriptor sent to the kconsumerd are now sent one at a time. The
problem was that there is a maximum packet size once the control buffer
is used with recvmsg/sendmsg. This upper bound can be read and set at :
/proc/sys/net/core/optmem_max.

Also, the kconsumerd execlp is set to verbose at this time for debugging
purpose.

Introduce --list-events to list all kernel events with the -k option
added. NOT supported for user-space at this point.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix kconsumerd multiple spawn bug
David Goulet [Wed, 1 Jun 2011 21:29:21 +0000 (17:29 -0400)] 
Fix kconsumerd multiple spawn bug

The kconsumerd thread was spawned even if there was already an existing
kconsumerd thread.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix already exist lttng rundir error
David Goulet [Wed, 1 Jun 2011 21:14:34 +0000 (17:14 -0400)] 
Fix already exist lttng rundir error

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoSet kconsumerd to quiet on execlp
David Goulet [Wed, 1 Jun 2011 15:34:06 +0000 (11:34 -0400)] 
Set kconsumerd to quiet on execlp

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoDon't quit when all FD hang up
Julien Desfossez [Fri, 27 May 2011 22:07:48 +0000 (00:07 +0200)] 
Don't quit when all FD hang up

We now wait for the STOP command to exit the polling thread.
When we receive this command and all FD has hung up (all data is
consumed) then we can exit cleanly.
We also close every fd as soon as they report an error.

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
12 years agoAdd listing kernel event support
David Goulet [Mon, 30 May 2011 22:06:50 +0000 (18:06 -0400)] 
Add listing kernel event support

Introduce the --list-events option which list all tracing event of the
kernel or/and an application.

Only kernel support here. User-space integration is coming.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoRemove useless zero initialization
David Goulet [Mon, 30 May 2011 15:53:02 +0000 (11:53 -0400)] 
Remove useless zero initialization

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoModify kconsumerd thread and spawning function
David Goulet [Fri, 27 May 2011 21:27:41 +0000 (17:27 -0400)] 
Modify kconsumerd thread and spawning function

In the kconsumerd thread, the one use case where the kconsumerd tells us
he's ready but we are unable to connect is now validate using the
kconsumerd_pid in the spawn_kconsumerd_thread function.

Also, we do not iterate over and over on the error socket anymore. Upon
receiving an error from the kconsumerd, this means that the daemon will
quit and thus the thread is no longer necessary.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd lttng-kconsumerd.h
David Goulet [Fri, 27 May 2011 20:40:44 +0000 (16:40 -0400)] 
Add lttng-kconsumerd.h

This header files contains data shared between the kconsumerd daemon and
the session daemon.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoIndent fix to switch
Julien Desfossez [Fri, 27 May 2011 20:41:42 +0000 (22:41 +0200)] 
Indent fix to switch

Coding style...

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
12 years agoIgnore first SIGINT
Julien Desfossez [Fri, 27 May 2011 20:41:41 +0000 (22:41 +0200)] 
Ignore first SIGINT

Add a counter to ignore the first ctrl+c (especially useful when
sessiond spawn kconsumerd). If the user presses ctrl+c an other time,
kconsumerd dies as expected.

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
12 years agoAdd missing open() option to kconsumerd
David Goulet [Fri, 27 May 2011 20:19:57 +0000 (16:19 -0400)] 
Add missing open() option to kconsumerd

From: Julien Desfossez <julien.desfossez@polymtl.ca>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoCleanup liblttngctl
David Goulet [Fri, 27 May 2011 20:17:51 +0000 (16:17 -0400)] 
Cleanup liblttngctl

Cleanup code, function declaration and comments.

Rename the lttng_check_session_daemon function to
lttng_session_daemon_alive.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix errors due to lttng.h cleanup
David Goulet [Fri, 27 May 2011 19:56:40 +0000 (15:56 -0400)] 
Fix errors due to lttng.h cleanup

Rename lttng/lttng.h to options.h in order to avoid confusion with the
public lttng.h header file.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoCleanup lttng.h public header
David Goulet [Fri, 27 May 2011 19:51:45 +0000 (15:51 -0400)] 
Cleanup lttng.h public header

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd kernel trace destroy functions
David Goulet [Fri, 27 May 2011 18:29:12 +0000 (14:29 -0400)] 
Add kernel trace destroy functions

Adds clean trace data structure cleanup using trace_destroy_kernel_*
functions.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd kernel trace data structure init functions
David Goulet [Fri, 27 May 2011 17:54:12 +0000 (13:54 -0400)] 
Add kernel trace data structure init functions

Adds back trace.c file which contains kernel trace data structure
initialization functions.

This simplifies a lot the kernel data structure creation and makes it
more modular to operate on those data type.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd debug and remove useless fct prototype
David Goulet [Thu, 26 May 2011 19:48:14 +0000 (15:48 -0400)] 
Add debug and remove useless fct prototype

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix kconsumerd thread on message error received
David Goulet [Thu, 26 May 2011 19:35:00 +0000 (15:35 -0400)] 
Fix kconsumerd thread on message error received

Only die if the message is not ALL FD HUNG UP.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd validation to stop a trace without a session name
David Goulet [Thu, 26 May 2011 19:15:43 +0000 (15:15 -0400)] 
Add validation to stop a trace without a session name

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix segfault when stoping a kernel session that does not exist
David Goulet [Thu, 26 May 2011 19:12:44 +0000 (15:12 -0400)] 
Fix segfault when stoping a kernel session that does not exist

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoClean kconsumerd spawning process
David Goulet [Thu, 26 May 2011 19:02:27 +0000 (15:02 -0400)] 
Clean kconsumerd spawning process

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd file, line nb. and function to debug error
David Goulet [Thu, 26 May 2011 18:45:40 +0000 (14:45 -0400)] 
Add file, line nb. and function to debug error

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoCleanup static declaration and move code around
David Goulet [Thu, 26 May 2011 18:43:41 +0000 (14:43 -0400)] 
Cleanup static declaration and move code around

Also set the ltt_session_list to extern and thus global. There is no
mutex protecting it for now. This will come on the multi-threaded
version of the session daemon.

Move a lot of code around to make static prototype disappear.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoUse trace.h for kernel and ust trace data struct
David Goulet [Thu, 26 May 2011 17:52:12 +0000 (13:52 -0400)] 
Use trace.h for kernel and ust trace data struct

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoCreate ust-ctl.c/.h files for user-space control
David Goulet [Thu, 26 May 2011 17:17:58 +0000 (13:17 -0400)] 
Create ust-ctl.c/.h files for user-space control

Remove trace.c which was only user-space tracer control and move it to
ust-ctl.c.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoInitial work for kernel tracing support
David Goulet [Wed, 25 May 2011 16:43:59 +0000 (12:43 -0400)] 
Initial work for kernel tracing support

This commit adds trace kernel support to the complete set of tools. It
is working with the LTTng 2.0 and output traces readeable by babeltrace.
Quick changes log below:

Add multiple debug statement and bug fixes.
Add kernel trace directory creation.
Add kernel structure teardown.
Start kconsumerd on create session.
Start kconsumerd thread after exec.

Following up this commit, there will be a huge cleanup because a lot of codes
was added to make it work but it's not necessarily clean code structure.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd tags from ctags to gitignore
David Goulet [Wed, 25 May 2011 21:25:27 +0000 (17:25 -0400)] 
Add tags from ctags to gitignore

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix memory allocation of local fd view
Julien Desfossez [Wed, 25 May 2011 16:41:04 +0000 (18:41 +0200)] 
Fix memory allocation of local fd view

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
12 years agoRemove the timeout on poll
Julien Desfossez [Tue, 24 May 2011 20:30:42 +0000 (22:30 +0200)] 
Remove the timeout on poll

Use a shared pipe to wake the poll thread when new fds arrive.

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
12 years agoLibkernctl sync ioctl values
Julien Desfossez [Tue, 24 May 2011 19:49:54 +0000 (21:49 +0200)] 
Libkernctl sync ioctl values

Updated ioctl values, add kernel tracepoint_list and tracer_version

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
12 years agoAdd kernel metadata support to lttng and API
David Goulet [Tue, 24 May 2011 17:16:15 +0000 (13:16 -0400)] 
Add kernel metadata support to lttng and API

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd kernel open metadata support to session daemon
David Goulet [Tue, 24 May 2011 17:12:28 +0000 (13:12 -0400)] 
Add kernel open metadata support to session daemon

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix handling of multiple FDs
Julien Desfossez [Tue, 24 May 2011 15:31:14 +0000 (17:31 +0200)] 
Fix handling of multiple FDs

This patch fixes the (normal) case where we handle more than one reading
fd. Previous versions were only tested with one FD, as of now we can
consume multiple fd (metadata and data for example).

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
12 years agoAdd kernel enable event support
David Goulet [Tue, 24 May 2011 15:32:17 +0000 (11:32 -0400)] 
Add kernel enable event support

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix pointer dereference
Julien Desfossez [Tue, 24 May 2011 14:20:44 +0000 (10:20 -0400)] 
Fix pointer dereference

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
12 years agoMove accept sequence
Julien Desfossez [Tue, 24 May 2011 14:20:43 +0000 (10:20 -0400)] 
Move accept sequence

We only accept one connection, so move it outside the main loop.

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
12 years agoSync ioctl headers with kernel
Julien Desfossez [Tue, 24 May 2011 14:20:42 +0000 (10:20 -0400)] 
Sync ioctl headers with kernel

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
12 years agoFatal error causes kconsumerd to exit
Julien Desfossez [Wed, 18 May 2011 17:58:11 +0000 (13:58 -0400)] 
Fatal error causes kconsumerd to exit

In each thread, if a fatal error occurs, all threads are killed and
kconsumerd exits thus preventing half working daemon. The session daemon
gets notified because kconsumerd disconnects from the error socket.

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
12 years agoHandle splice errors
Julien Desfossez [Tue, 24 May 2011 14:15:47 +0000 (10:15 -0400)] 
Handle splice errors

Send to the session daemon the eventual error returned by splice.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd kernel sesison and channel creation support
David Goulet [Thu, 19 May 2011 21:59:14 +0000 (17:59 -0400)] 
Add kernel sesison and channel creation support

New kernel-ctl.c/.h files used to interact with the libkernelctl for the
session daemon. All kernel trace actions are made in this C file.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoMajor changes on the lttng command line tool
David Goulet [Wed, 18 May 2011 21:40:33 +0000 (17:40 -0400)] 
Major changes on the lttng command line tool

Add create and destroy trace action but NOT implemented on the session
daemon side.

Add kernel create channel option but NOT implemented on the session
daemon side.

Add auto_session and auto_trace support for the lttng tool. This means
that if only --start is specified with a certain pid for instance, a
session is automatically created and a trace.

Fix a bug on the session daemon side where the ret value was changed
when no lttcomm_lttng_msg structure was allocated before replying to the
client.

Add a lot more command line validation for conflicting command.

Remove the use of UUID in the session name and for the create trace of
the liblttngctl API.

Remove the memset(0) applied to the llm structure of liblttngctl thus
resetting every information. This is not wanted for multiple command for
one lttng execution.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
This page took 0.040801 seconds and 4 git commands to generate.