lttng-tools.git
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>
12 years agoImport kernel control interface
David Goulet [Wed, 18 May 2011 16:06:02 +0000 (12:06 -0400)] 
Import kernel control interface

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoInitial import of kconsumerd and libkernelctl
Julien Desfossez [Fri, 6 May 2011 17:45:00 +0000 (13:45 -0400)] 
Initial import of kconsumerd and libkernelctl

Import the new kernel consumer along with the kernel tracing control
library.

kernel-ioctl.h is taken from the lttng-modules tree.

Missing:
- Send back error to session daemon on splice error
- kconsumerd clean tear down on error for both threads

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix lttng bug having the wrong sessiond path
David Goulet [Tue, 17 May 2011 15:57:49 +0000 (11:57 -0400)] 
Fix lttng bug having the wrong sessiond path

Executing lttng with uid=0 and not being in the tracing group was
setting the wrong default session daemon path in the liblttngctl API.

Also adds two debug output for the session daemon.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoMajor changes of command processing for sessiond
David Goulet [Mon, 16 May 2011 21:34:23 +0000 (17:34 -0400)] 
Major changes of command processing for sessiond

This follows up a TODO added at commit 5e16da05 by me and Mathieu
Desnoyers about the command processing using a command context.

This patch introduce a command context data structure which contains all
the necessary information to process a command received by the session
daemon from the lttng client.

The entire session daemon is refactored with this addition. All
userspace trace action also. The global current_session pointer is
removed and is now in the command context struct. Some of the functions
for the buffer allocation are removed/changed.

This is the first step of getting the session daemon multi-threaded.

This patch also fix the -h bug of the lttng client introduce in the
commit 5e16da05. Minor variable renaming also occured.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd lttng-share header and change data type
David Goulet [Mon, 16 May 2011 17:19:17 +0000 (13:19 -0400)] 
Add lttng-share header and change data type

Add the lttng-share.h file for common code needed all accross the
lttng-tools tree.

Session daemon communication library is refactored to use typedef
uint32_t data type for enums and pid_t.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd lttng-kernel header
David Goulet [Mon, 16 May 2011 16:43:08 +0000 (12:43 -0400)] 
Add lttng-kernel header

This header contains copied structure from the new LTTng kernel tree
use by the tracer and the consumer. We are not exporting them to the
public anymore thus the removal from lttng.h header file.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix wrong goto
David Goulet [Mon, 16 May 2011 16:21:01 +0000 (12:21 -0400)] 
Fix wrong goto

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoComments and cleanup review Mathieu & David
Mathieu Desnoyers [Fri, 13 May 2011 18:17:34 +0000 (14:17 -0400)] 
Comments and cleanup review Mathieu & David

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd parameters name to the function prototype
David Goulet [Mon, 9 May 2011 18:22:27 +0000 (14:22 -0400)] 
Add parameters name to the function prototype

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoInitial import of libkernelctl and data structures
David Goulet [Fri, 6 May 2011 17:17:49 +0000 (13:17 -0400)] 
Initial import of libkernelctl and data structures

First code import of the new libkernelctl that replaces ltt-contol used
to interact with the LTTng kernel tracer.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
12 years agoMove ust trace actions to trace.c
David Goulet [Fri, 6 May 2011 15:58:31 +0000 (11:58 -0400)] 
Move ust trace actions to trace.c

Move from main.c to trace.c all UST specific trace actions. Now, if we
get a pid from the lttng client, we try to connect before dealing with
the commands.

Move current_session to an extern declaration in session.h.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoRename data structure for naming consistency
David Goulet [Fri, 6 May 2011 15:25:29 +0000 (11:25 -0400)] 
Rename data structure for naming consistency

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd communication data structure for kconsumerd
David Goulet [Fri, 6 May 2011 15:13:35 +0000 (11:13 -0400)] 
Add communication data structure for kconsumerd

First step of the kconsumerd integration. Those structures are needed
for kconsumerd and session daemon communications.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd kconsumerd thread function and sockets
David Goulet [Thu, 5 May 2011 19:15:10 +0000 (15:15 -0400)] 
Add kconsumerd thread function and sockets

Adds the first part of the kconsumerd thread and setup the sockets.

This patch moves every sockets of the sessiond (run as root) to
/var/run/lttng.

Fix various comments and function name to make things clearer.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd support for auto session creation
David Goulet [Wed, 4 May 2011 20:37:26 +0000 (16:37 -0400)] 
Add support for auto session creation

Support for auto session creation when no session (-s) is specified. The
session is created with the name being the current date and time. For
all commands that do not needs a session, no auto session is created and
for thoses who needs -s also.

Improve shorten uuid management all around the lttng client code.

Fix uuid usage in lttng_session data structure and a small fix in the
liblttngctl for the set_current_uuid fct.

Fix session name regex of the tests.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd support for shorten session uuid
David Goulet [Wed, 4 May 2011 16:26:03 +0000 (12:26 -0400)] 
Add support for shorten session uuid

Session are now identified by name.short_uuid where short_uuid is the
first 8 bytes of the 36 bytes uuid.

Also, fix the bug where you could'nt pass two command to the session
daemon from liblttngctl. The connect and disconnect is added to the
ask_sessiond function. So, on every command, a connect and close is
done.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix bug when finding session by name
David Goulet [Tue, 3 May 2011 20:46:05 +0000 (16:46 -0400)] 
Fix bug when finding session by name

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoRename liblttngctl.h to lttng.h
David Goulet [Tue, 3 May 2011 19:59:52 +0000 (15:59 -0400)] 
Rename liblttngctl.h to lttng.h

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoEmpty import of libkernelctl
David Goulet [Tue, 3 May 2011 19:54:23 +0000 (15:54 -0400)] 
Empty import of libkernelctl

Add directory structure and modify tree structure in
order to compile this internal library.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd missing stdio header for fprintf
David Goulet [Tue, 3 May 2011 17:23:26 +0000 (13:23 -0400)] 
Add missing stdio header for fprintf

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd -p, --pid option to lttng command line
David Goulet [Mon, 2 May 2011 20:42:35 +0000 (16:42 -0400)] 
Add -p, --pid option to lttng command line

This makes create, start and stop trace available for both kernel and
userspace tracing. For userspace tracing, use the -p, --pid option to
enable those action for an application identified by a pid.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd ust stop trace feature
David Goulet [Mon, 2 May 2011 20:10:36 +0000 (16:10 -0400)] 
Add ust stop trace feature

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoChange get cmdline function and list print
David Goulet [Mon, 2 May 2011 19:49:56 +0000 (15:49 -0400)] 
Change get cmdline function and list print

Make the function return a pointer to the proc cmdline allocated string.
List traces and applications are modified to use it.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd trace listing feature
David Goulet [Mon, 2 May 2011 19:34:25 +0000 (15:34 -0400)] 
Add trace listing feature

This patch adds the possibility to list the available traces for a
specific session.

The new lttng_trace data structure is a representation of a trace for
use for 'human output'.

Some fct are added to trace.c to get the trace count of a session and
list those traces. Also, trace counter are added to a ltt_session.

Some renaming is done to make things clearer. A name is added to a
userspace trace also.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd debug statements to session daemon
David Goulet [Mon, 2 May 2011 18:24:09 +0000 (14:24 -0400)] 
Add debug statements to session daemon

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd verbose option to session daemon
David Goulet [Mon, 2 May 2011 18:08:03 +0000 (14:08 -0400)] 
Add verbose option to session daemon

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd ust start trace feature
David Goulet [Mon, 2 May 2011 18:04:39 +0000 (14:04 -0400)] 
Add ust start trace feature

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd trace C file called trace.c
David Goulet [Mon, 2 May 2011 17:41:21 +0000 (13:41 -0400)] 
Add trace C file called trace.c

This file contains every useful fct to manage and deal
with lttng-tools' trace data structures.

Add missing headers to session.h to resolve the compiling
issues with trace.c.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd create trace option validation
David Goulet [Mon, 2 May 2011 15:23:29 +0000 (11:23 -0400)] 
Add create trace option validation

Can't create a trace without a session ID for now.

Future works will create a session automatically.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd the get command line path from PID fct
David Goulet [Mon, 2 May 2011 15:03:05 +0000 (11:03 -0400)] 
Add the get command line path from PID fct

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoMove lttng trace data structure to trace.h
David Goulet [Fri, 29 Apr 2011 18:54:13 +0000 (14:54 -0400)] 
Move lttng trace data structure to trace.h

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoMinor code ordering and comments
David Goulet [Fri, 29 Apr 2011 17:15:17 +0000 (13:15 -0400)] 
Minor code ordering and comments

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoMove traceable app. data to a seperate C file
David Goulet [Fri, 29 Apr 2011 17:00:39 +0000 (13:00 -0400)] 
Move traceable app. data to a seperate C file

All traceable application data structure and functions
are now in traceable-app.c/.h.

To remove traceable app data struct dependency from main.c,
register_traceable_app, unregister_traceable_app and get_app_count
is added. Also, main.c is now using these function.

Also, the find_app_by_pid returns the struct pointer.

Minor spaces fix in the code for session.c/.h and main.c

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoMove session data and functions to session.c/.h
David Goulet [Fri, 29 Apr 2011 16:04:02 +0000 (12:04 -0400)] 
Move session data and functions to session.c/.h

Moving all session data to a specific C file. Basic changes to the code
was necessary to make functions and variables non-static. Adds a
get_session_count to protect direct changes to the session counter.

Also, rename ltt-sessiond.c to main.c.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix the lttng popt context param
David Goulet [Fri, 29 Apr 2011 17:04:42 +0000 (13:04 -0400)] 
Fix the lttng popt context param

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoChange __lttng_print to a define macro
David Goulet [Fri, 29 Apr 2011 15:55:21 +0000 (11:55 -0400)] 
Change __lttng_print to a define macro

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoMake code simpler for send buffer header size
David Goulet [Thu, 28 Apr 2011 18:49:10 +0000 (14:49 -0400)] 
Make code simpler for send buffer header size

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoDeny multiple session with the same name
David Goulet [Thu, 28 Apr 2011 18:27:46 +0000 (14:27 -0400)] 
Deny multiple session with the same name

This commit fixes the possibility of creating two or more
sessions with the same name.

Also fixes a small bug in the sessiond test.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd a basic structure for tests and sessiond tests
David Goulet [Thu, 28 Apr 2011 17:07:23 +0000 (13:07 -0400)] 
Add a basic structure for tests and sessiond tests

Basic stuff for ltt-sessiond testing. Also, the runall.sh
should be used for all tests.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix cleanup bug
David Goulet [Thu, 28 Apr 2011 14:49:40 +0000 (10:49 -0400)] 
Fix cleanup bug

If the daemon was already running, a cleanup occured making
the two unix sockets being unlinked.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix minor bug and usage formating
David Goulet [Thu, 28 Apr 2011 14:32:09 +0000 (10:32 -0400)] 
Fix minor bug and usage formating

Client socket path was set to 's' and not 'c'.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd mutex protection for the traceable apps
David Goulet [Wed, 27 Apr 2011 19:31:56 +0000 (15:31 -0400)] 
Add mutex protection for the traceable apps

The two threads are using this list so now protected
by a pthread_mutex_t using add and del function.

Also introduce add and del function to manage
the session list.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix create trace using the current session
David Goulet [Wed, 27 Apr 2011 18:53:49 +0000 (14:53 -0400)] 
Fix create trace using the current session

Better create trace internal function for the session daemon.

Add a check for command that needs a session.
Add lttcomm error message for missing session.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd ust create trace feature
David Goulet [Wed, 27 Apr 2011 17:25:48 +0000 (13:25 -0400)] 
Add ust create trace feature

Can now create a trace with name set to 'auto' using
the PID of the application.

Also, this patch adds a missing param to the long_options, add
some information for help and sort the option's array.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoChange list command line options -l and -L
David Goulet [Wed, 27 Apr 2011 15:40:13 +0000 (11:40 -0400)] 
Change list command line options -l and -L

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd close unix socket function to libcomm API
David Goulet [Wed, 27 Apr 2011 15:34:10 +0000 (11:34 -0400)] 
Add close unix socket function to libcomm API

Using clean_exit everywhere in lttng now and adding
the session daemon disconnect to that clean exit function.

Also fix the recv <= 0 for process client msg on the
session daemon side in order to not send back empty data.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd --session feature
David Goulet [Wed, 27 Apr 2011 15:18:25 +0000 (11:18 -0400)] 
Add --session feature

This allows any user to select a session and any
tracing command will affect that particular session.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd destroy session feature
David Goulet [Tue, 26 Apr 2011 20:36:38 +0000 (16:36 -0400)] 
Add destroy session feature

The destroy command is added. Some fixes were needed
for destroy_session function in ltt-sessiond and basic
handling of uuid.

Now, the whole chain of tools uses libuuid.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoClean some part of the code
David Goulet [Tue, 26 Apr 2011 19:11:25 +0000 (15:11 -0400)] 
Clean some part of the code

Add goto to send data in the process client command.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoAdd create session feature
David Goulet [Tue, 26 Apr 2011 19:02:17 +0000 (15:02 -0400)] 
Add create session feature

Add create session command to liblttngctl, lttng and
session daemon.

Fix a major bug with send data buffer having the wrong
pointer arithmetic and thus failing with memcpy.

Add -fno-strict-aliasing to the global CFLAGS.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
12 years agoFix segfault for ltt-sessiond pathname
David Goulet [Fri, 22 Apr 2011 14:56:59 +0000 (10:56 -0400)] 
Fix segfault for ltt-sessiond pathname

The getenv sessiond path could return NULL so the strdup failed
at this point.

Also added the "not running" indication when listing pids that are not
found in /proc.

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