summary |
shortlog | log |
commit |
commitdiff |
tree
first ⋅ prev ⋅ next
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
David Goulet [Thu, 21 Apr 2011 21:29:32 +0000 (17:29 -0400)]
Major changes for the daemon data transmission
This commit reengineer the data transmission from the session daemon to
the liblttngctl. Instead of sending a packet on a per data structure
basis, this scheme uses lttcomm_lttng_msg structure has a header control
structure adding the payload_size to it. The payload data is then
appended after and only one send() is used.
This will permit AF_INET socket scaling for future development.
List sessions and list apps command has been modified to fit this
change.
In the meantime, some unuse code is removed and minor cleanup.
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
David Goulet [Thu, 21 Apr 2011 19:02:15 +0000 (15:02 -0400)]
Add lttngerr support to ltt-sessiond
Now using the lttngerr API for message/error printing.
Also add the quiet option to the ltt-sessiond. The lttng auto spawn
session daemon option was also modified to use that quiet option to not
to pollute stdout when that spawned daemon is killed.
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
David Goulet [Thu, 21 Apr 2011 18:50:18 +0000 (14:50 -0400)]
Add listing session option
The lttng client can now list available sessions using the liblttngctl
API and session daemon support.
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
David Goulet [Thu, 21 Apr 2011 16:31:00 +0000 (12:31 -0400)]
Replace daemonize function by std glibc daemon()
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
David Goulet [Tue, 19 Apr 2011 16:41:02 +0000 (12:41 -0400)]
Add support for session daemon auto spawn
The lttng tool now spawns a session daemon if no ltt-sessiond is
running. Two new options added to control this behavior.
Introduce --sessiond-path and --no-sessiond to lttng command line tool.
Add --sig-parent to ltt-sessiond that sends a SIGCHLD to the parent pid
when the daemon is ready to process client command.
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
David Goulet [Wed, 20 Apr 2011 19:56:29 +0000 (15:56 -0400)]
Minor fix for ERR() call in lttng
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
David Goulet [Wed, 20 Apr 2011 19:33:23 +0000 (15:33 -0400)]
Change client message processing
ltt-sessiond can now send multiple response to the client for only one
command.
The list traceable apps command was modified accordingly to that
modification and now send one response per pid.
The liblttnctl was also changed to handle multiple reply and the
recvfrom_sessiond internal function is added removing the recv from the
ask_sessiond() function. Fine grained control helps.
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
Mathieu Desnoyers [Wed, 13 Apr 2011 21:56:21 +0000 (17:56 -0400)]
Minor code cleanup
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mathieu Desnoyers [Wed, 13 Apr 2011 21:39:52 +0000 (17:39 -0400)]
Copyright notices cleanup
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
David Goulet [Wed, 13 Apr 2011 20:15:24 +0000 (16:15 -0400)]
Initial import
This is the first import of the lttng-tools tree.
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
This page took 0.034466 seconds and 4 git commands to generate.