lttng-tools.git
10 years agoRename consumerd32/64_path options to _bin
Alexandre Montplaisir [Mon, 5 Dec 2011 22:30:06 +0000 (17:30 -0500)] 
Rename consumerd32/64_path options to _bin

The _path suffix was confusing as to whether it would include the
filename at the end or not. In fact it should (to allow greater
flexibility in moving/renaming the consumerd executable).

Rename all configure options, env vars and substition variables to
consumerd32/64_bin instead, and expect the user to pass a complete
basename + filename to those.

Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix ust app tracepoint list realloc
Mathieu Desnoyers [Mon, 5 Dec 2011 18:24:36 +0000 (13:24 -0500)] 
Fix ust app tracepoint list realloc

- memcpy data _after_ reallocation (corruption fix),
- fix off-by-one in size check (corruption fix),
- multiply size by 2 each time size increase is needed (optimisation).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix bad return value on enable syscalls making it freeze
David Goulet [Mon, 5 Dec 2011 17:06:35 +0000 (12:06 -0500)] 
Fix bad return value on enable syscalls making it freeze

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoUpdate libpopt dependency to 1.13
Mathieu Desnoyers [Thu, 1 Dec 2011 16:43:09 +0000 (11:43 -0500)] 
Update libpopt dependency to 1.13

After careful review of popt cvs tree, after cross-correlation of CHANGE
file with source code POPT_ARGFLAG_OPTIONAL updates, identified that the
updates to this part of the code end at 1.13.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoDocument dependency on libpopt >= 1.8
Mathieu Desnoyers [Thu, 1 Dec 2011 16:17:25 +0000 (11:17 -0500)] 
Document dependency on libpopt >= 1.8

ref: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=285666

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoDescribe autotools/libtool/automake version dependency
Mathieu Desnoyers [Thu, 1 Dec 2011 15:41:08 +0000 (10:41 -0500)] 
Describe autotools/libtool/automake version dependency

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoRemove m4_ifdef for AC_PROG_LIBTOOL (deprecated)
Mathieu Desnoyers [Thu, 1 Dec 2011 15:18:53 +0000 (10:18 -0500)] 
Remove m4_ifdef for AC_PROG_LIBTOOL (deprecated)

This trick does not seem to work anyway.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix --disable-lttng-ust build after UST API update
Mathieu Desnoyers [Wed, 30 Nov 2011 23:58:45 +0000 (18:58 -0500)] 
Fix --disable-lttng-ust build after UST API update

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoUpdate following loglevel support UST API change
Mathieu Desnoyers [Wed, 30 Nov 2011 23:32:15 +0000 (18:32 -0500)] 
Update following loglevel support UST API change

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoAdd missing rcu read lock
David Goulet [Wed, 30 Nov 2011 22:26:00 +0000 (17:26 -0500)] 
Add missing rcu read lock

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoCleanup ust app delete functions
David Goulet [Wed, 30 Nov 2011 22:14:11 +0000 (17:14 -0500)] 
Cleanup ust app delete functions

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoFix missing declaration without UST support
David Goulet [Wed, 30 Nov 2011 22:13:39 +0000 (17:13 -0500)] 
Fix missing declaration without UST support

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoMerge branch 'master' of git://git.lttng.org/lttng-tools
David Goulet [Wed, 30 Nov 2011 21:35:37 +0000 (16:35 -0500)] 
Merge branch 'master' of git://git.lttng.org/lttng-tools

10 years agoSupport for UST context
David Goulet [Wed, 30 Nov 2011 21:34:47 +0000 (16:34 -0500)] 
Support for UST context

Adds the support to add context on channel and/or events for UST global
domain.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoRemove function:entry option to discourage its use
Mathieu Desnoyers [Wed, 30 Nov 2011 20:39:11 +0000 (15:39 -0500)] 
Remove function:entry option to discourage its use

Removed from kernel tracer.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoAdd context exist error code
David Goulet [Wed, 30 Nov 2011 19:35:19 +0000 (14:35 -0500)] 
Add context exist error code

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoFix realloc invalid next size
David Goulet [Wed, 30 Nov 2011 16:30:14 +0000 (11:30 -0500)] 
Fix realloc invalid next size

Reported-by: Tan Dung Le Tran <tan.dung.le.tran@ericsson.com>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoSupport older versions of autotools
Mathieu Desnoyers [Wed, 30 Nov 2011 14:05:47 +0000 (09:05 -0500)] 
Support older versions of autotools

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoAdd a --with-consumerd-only configure option
Alexandre Montplaisir [Wed, 30 Nov 2011 00:17:43 +0000 (19:17 -0500)] 
Add a --with-consumerd-only configure option

This will only build the consumer daemon (and its liblttng-consumer
library), and skip the lttng and lttng-sessiond binaries.

This will be useful when a user wants to support both 32-bit and
64-bit applications on the same system. Only one sessiond is
needed, but we need a consumer for each architecture.

Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoCleanup configure.ac
Alexandre Montplaisir [Wed, 30 Nov 2011 00:16:31 +0000 (19:16 -0500)] 
Cleanup configure.ac

Use AS_IF() and AS_ECHO() macros whenever possible.
Print the configuration options at the end of the script
(so they don't get lost in the sea of the configure output).

Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix ust_app_clean_list segfault
Mathieu Desnoyers [Tue, 29 Nov 2011 23:54:25 +0000 (18:54 -0500)] 
Fix ust_app_clean_list segfault

The 4th parameter of cds_lfht_for_each_entry is the member of the
structure, not a pointer to a variable. Therefore, node was never
populated.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoCheck hashtable_del return values
Mathieu Desnoyers [Tue, 29 Nov 2011 23:43:17 +0000 (18:43 -0500)] 
Check hashtable_del return values

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoMerge branch 'master' of git://git.lttng.org/lttng-tools
David Goulet [Tue, 29 Nov 2011 23:18:13 +0000 (18:18 -0500)] 
Merge branch 'master' of git://git.lttng.org/lttng-tools

10 years agoFix disable/enable channel when app registers
David Goulet [Tue, 29 Nov 2011 23:15:25 +0000 (18:15 -0500)] 
Fix disable/enable channel when app registers

Upon registration, a disable channel in the global domain was created
but not disabled afterwords being enabled by default on the tracer. This
commit fix that for channels and events as well.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoRename ust app function for better semantic
David Goulet [Tue, 29 Nov 2011 22:42:21 +0000 (17:42 -0500)] 
Rename ust app function for better semantic

Replace _all by _glb meaning global. This family of functions (ending
with _glb) apply an action on *all* registered applications.

Also fix the setting the enabled flag on disable-event.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoAdd UST event not found error code
David Goulet [Tue, 29 Nov 2011 22:38:44 +0000 (17:38 -0500)] 
Add UST event not found error code

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoFix enable-event for UST events
David Goulet [Tue, 29 Nov 2011 22:09:27 +0000 (17:09 -0500)] 
Fix enable-event for UST events

When enabling an existing event, a new event creation occured which was
simply the bad thing to do. This patch fix that by adding the
enable_ust_event call for the case.

Also fixes a segfault where any UST object could be release with the
data pointer being set to NULL.

This patch introduce also assert() in the UST app code for
create/enable/disable event. The purpose is to catch, in dev, the bad
code execution flow and fix it.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoAdd UST event exist error code
David Goulet [Tue, 29 Nov 2011 22:00:11 +0000 (17:00 -0500)] 
Add UST event exist error code

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoInit point to NULL in case of free() for 64-bit too
Mathieu Desnoyers [Tue, 29 Nov 2011 21:03:16 +0000 (16:03 -0500)] 
Init point to NULL in case of free() for 64-bit too

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoApply autoupdate to configure.ac
Mathieu Desnoyers [Tue, 29 Nov 2011 20:28:19 +0000 (15:28 -0500)] 
Apply autoupdate to configure.ac

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix --enable-lttng-ust configure option
Alexandre Montplaisir [Tue, 29 Nov 2011 20:20:43 +0000 (15:20 -0500)] 
Fix --enable-lttng-ust configure option

Specifying either --enable-lttng-ust or --disable-lttng-ust
would DISABLE the option. This fix makes it listen to either we
want to enable or disable it (it remains enabled by default).

Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoAC_HELP_STRING is deprecated, use AS_HELP_STRING
Mathieu Desnoyers [Tue, 29 Nov 2011 20:17:49 +0000 (15:17 -0500)] 
AC_HELP_STRING is deprecated, use AS_HELP_STRING

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoRemove unused UST channel code
David Goulet [Tue, 29 Nov 2011 19:38:35 +0000 (14:38 -0500)] 
Remove unused UST channel code

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoRename kernel-ctl.c/.h to kernel.c/.h
David Goulet [Tue, 29 Nov 2011 19:31:28 +0000 (14:31 -0500)] 
Rename kernel-ctl.c/.h to kernel.c/.h

Just to follow the function call standard and since kernelctl exist out
of the code tree.

Also remove ust-ctl.c which is not used and not compiled at all.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoInit pointer to NULL in case of free()
David Goulet [Tue, 29 Nov 2011 18:55:08 +0000 (13:55 -0500)] 
Init pointer to NULL in case of free()

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoMerge branch 'master' of git://git.lttng.org/lttng-tools
David Goulet [Tue, 29 Nov 2011 18:44:47 +0000 (13:44 -0500)] 
Merge branch 'master' of git://git.lttng.org/lttng-tools

10 years agoAdd missing declaration when UST is disabled
David Goulet [Tue, 29 Nov 2011 18:44:10 +0000 (13:44 -0500)] 
Add missing declaration when UST is disabled

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoRename consumerd32_bindir -> consumerd32_path
Alexandre Montplaisir [Tue, 29 Nov 2011 13:12:01 +0000 (08:12 -0500)] 
Rename consumerd32_bindir -> consumerd32_path

Fixes build error on 32-bit arches.

Signed-off-by: Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoSetup LD_LIBRARY_PATH if 32/64 bit consumer libdir is set
Mathieu Desnoyers [Tue, 29 Nov 2011 00:20:09 +0000 (19:20 -0500)] 
Setup LD_LIBRARY_PATH if 32/64 bit consumer libdir is set

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoImplement consumer bin/lib 32/64-bit configure/env/arg support
Mathieu Desnoyers [Mon, 28 Nov 2011 23:52:04 +0000 (18:52 -0500)] 
Implement consumer bin/lib 32/64-bit configure/env/arg support

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoIntroduce --with-consumer32-bindir and --with-consumer64-bindir
Mathieu Desnoyers [Mon, 28 Nov 2011 23:22:54 +0000 (18:22 -0500)] 
Introduce --with-consumer32-bindir and --with-consumer64-bindir

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoChange ust app clean list loop
David Goulet [Mon, 28 Nov 2011 19:57:12 +0000 (14:57 -0500)] 
Change ust app clean list loop

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agolttng disable_events: ensure end of string is set to \0
Mathieu Desnoyers [Fri, 25 Nov 2011 11:12:14 +0000 (12:12 +0100)] 
lttng disable_events: ensure end of string is set to \0

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agostreamline channel_new_default_attr switch statement with coding style
Mathieu Desnoyers [Fri, 25 Nov 2011 10:53:40 +0000 (11:53 +0100)] 
streamline channel_new_default_attr switch statement with coding style

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agochannel_new_default_attr: fix usage memory leaks
Mathieu Desnoyers [Fri, 25 Nov 2011 10:51:52 +0000 (11:51 +0100)] 
channel_new_default_attr: fix usage memory leaks

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoAdd single disable UST event support
David Goulet [Thu, 24 Nov 2011 20:53:46 +0000 (15:53 -0500)] 
Add single disable UST event support

Support for disabling a single UST event for a specific channel.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoNULL ptr validation across liblttngctl
David Goulet [Thu, 24 Nov 2011 20:38:48 +0000 (15:38 -0500)] 
NULL ptr validation across liblttngctl

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoDo not permit NULL pointer on enable API calls
David Goulet [Thu, 24 Nov 2011 20:22:31 +0000 (15:22 -0500)] 
Do not permit NULL pointer on enable API calls

Enable channel lttng API call now forbids the use of NULL pointer for
channel attributes.

Use lttng_channel_set_default_attr() before.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoAdd disable all UST event(s) command
David Goulet [Thu, 24 Nov 2011 20:11:52 +0000 (15:11 -0500)] 
Add disable all UST event(s) command

Note that you can only disable all events for a specific channel (like
the kernel). So, using the UST global domain (-u -a), only the event(s)
in the specified channel will be disabled for all registered
applications.

Bottom line, it disables all events in a channel.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoAdd new API call lttng_channel_set_default_attr
David Goulet [Wed, 23 Nov 2011 22:25:01 +0000 (17:25 -0500)] 
Add new API call lttng_channel_set_default_attr

This call takes a lttng domain and an allocated channel attributes
pointer and set the default attributes of the channel according to the
domain type.

This commit also fix a listing problem where the wrong output type of
the channel was returned for UST.

The enable-channel command is also changed to used that new API call.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoFix events listing using the channel name
David Goulet [Wed, 23 Nov 2011 21:28:17 +0000 (16:28 -0500)] 
Fix events listing using the channel name

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoFix missing channel name copy for auto channel creation
David Goulet [Wed, 23 Nov 2011 21:22:02 +0000 (16:22 -0500)] 
Fix missing channel name copy for auto channel creation

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoAdd disable-channel support for UST
David Goulet [Wed, 23 Nov 2011 20:49:56 +0000 (15:49 -0500)] 
Add disable-channel support for UST

The enable channel command (for UST) was not working for already created
channel so this commit fix it by adding an enable function call when the
UST channel already exist onto the session.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoAdd UST default channel creation support
David Goulet [Wed, 23 Nov 2011 18:19:04 +0000 (13:19 -0500)] 
Add UST default channel creation support

When enabling event without a channel specified, a default channel
(channel0) will be created.

Also fix the enabled flag for channels when listing them.

Minor fix of code and comments.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoAdd debug statement to the teardown session
David Goulet [Wed, 23 Nov 2011 17:49:23 +0000 (12:49 -0500)] 
Add debug statement to the teardown session

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoCleanup and streamline kernel and ust teardown session
Mathieu Desnoyers [Wed, 23 Nov 2011 06:19:48 +0000 (07:19 +0100)] 
Cleanup and streamline kernel and ust teardown session

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix null pointer dereference when destroying a UST session with no channels
Mathieu Desnoyers [Wed, 23 Nov 2011 06:17:12 +0000 (07:17 +0100)] 
Fix null pointer dereference when destroying a UST session with no channels

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoRename "comm" context into "procname"
Mathieu Desnoyers [Tue, 22 Nov 2011 09:08:08 +0000 (10:08 +0100)] 
Rename "comm" context into "procname"

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix nb_domain signedness in list command
Mathieu Desnoyers [Tue, 22 Nov 2011 09:02:47 +0000 (10:02 +0100)] 
Fix nb_domain signedness in list command

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix multi-channel listing
Mathieu Desnoyers [Tue, 22 Nov 2011 08:57:31 +0000 (09:57 +0100)] 
Fix multi-channel listing

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoedit printout in lttng list "all" channels
Mathieu Desnoyers [Tue, 22 Nov 2011 08:51:23 +0000 (09:51 +0100)] 
edit printout in lttng list "all" channels

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoReport errors in write_config
Mathieu Desnoyers [Mon, 21 Nov 2011 16:26:40 +0000 (17:26 +0100)] 
Report errors in write_config

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoAllocate session UID with count increment
Mathieu Desnoyers [Mon, 21 Nov 2011 15:55:25 +0000 (16:55 +0100)] 
Allocate session UID with count increment

Otherwise, the UST session UID gets assigned only when the first UST
channel is created for a session, causing IDs to be used for many
sessions (the count of the number of sessions allocated so far) if the
session creation / channel creation is not performed in a usual
sequence.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agofix reversed enabled/disabled, active/inactive printout
Mathieu Desnoyers [Mon, 21 Nov 2011 09:10:14 +0000 (04:10 -0500)] 
fix reversed enabled/disabled, active/inactive printout

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoImplement 32/64 bit consumer support
Mathieu Desnoyers [Mon, 21 Nov 2011 08:52:30 +0000 (03:52 -0500)] 
Implement 32/64 bit consumer support

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix consumer pid mutex double-unlock
Mathieu Desnoyers [Sat, 19 Nov 2011 20:47:05 +0000 (15:47 -0500)] 
Fix consumer pid mutex double-unlock

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoIntroduce build/env/argument override for 32-bit compat consumer
Mathieu Desnoyers [Sat, 19 Nov 2011 20:36:48 +0000 (15:36 -0500)] 
Introduce build/env/argument override for 32-bit compat consumer

Also remove unnecessary use of strdup on optarg.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoAdd configure LTTNG_TOOLS_COMPAT_BIN_PREFIX env var support
Mathieu Desnoyers [Sat, 19 Nov 2011 20:03:59 +0000 (15:03 -0500)] 
Add configure LTTNG_TOOLS_COMPAT_BIN_PREFIX env var support

Defines CONFIG_COMPAT_BIN_PREFIX in the build.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoSimply close socket when application registration is refused
Mathieu Desnoyers [Sat, 19 Nov 2011 17:17:03 +0000 (12:17 -0500)] 
Simply close socket when application registration is refused

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoUpdate warning msg
Mathieu Desnoyers [Sat, 19 Nov 2011 16:50:00 +0000 (11:50 -0500)] 
Update warning msg

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix warning about hash type
Mathieu Desnoyers [Sat, 19 Nov 2011 16:23:40 +0000 (11:23 -0500)] 
Fix warning about hash type

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoDetect 32-bit compat applications + 32-bit warning fixes
Mathieu Desnoyers [Sat, 19 Nov 2011 16:22:05 +0000 (11:22 -0500)] 
Detect 32-bit compat applications + 32-bit warning fixes

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoImplement UST destroy session
Mathieu Desnoyers [Sat, 19 Nov 2011 14:43:11 +0000 (09:43 -0500)] 
Implement UST destroy session

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoImplement UST stop command
Mathieu Desnoyers [Sat, 19 Nov 2011 00:06:02 +0000 (19:06 -0500)] 
Implement UST stop command

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoEnsure sockets are kept open across all their hash table life-span
Mathieu Desnoyers [Fri, 18 Nov 2011 21:24:40 +0000 (16:24 -0500)] 
Ensure sockets are kept open across all their hash table life-span

Otherwise causes races where re-use of a socket is being incorrectly
removed.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoSupport older autotools versions lack of AM_SILENT_RULES
Mathieu Desnoyers [Thu, 17 Nov 2011 20:22:10 +0000 (15:22 -0500)] 
Support older autotools versions lack of AM_SILENT_RULES

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoAdd creation time to UST app path to ensure uniqueness
Mathieu Desnoyers [Wed, 16 Nov 2011 13:16:14 +0000 (08:16 -0500)] 
Add creation time to UST app path to ensure uniqueness

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoust-app: fix bogus double-use of iterator
Mathieu Desnoyers [Wed, 16 Nov 2011 02:48:58 +0000 (21:48 -0500)] 
ust-app: fix bogus double-use of iterator

"yo dawg, I'm using my iterator in my iterator".

;-)

Fixes pretty much all of N event/N channel/N session UST problems.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoUST consumer: fix read on hangup, and UST get subbuf error handling
Mathieu Desnoyers [Wed, 16 Nov 2011 02:01:47 +0000 (21:01 -0500)] 
UST consumer: fix read on hangup, and UST get subbuf error handling

This fixes multiple consecutive runs of the "demo" program, where
sometimes one channel would not be saved.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix multi-session UST handling combined with shm fd teardown
Mathieu Desnoyers [Wed, 16 Nov 2011 01:24:41 +0000 (20:24 -0500)] 
Fix multi-session UST handling combined with shm fd teardown

shm fd is used as unique identifier for the channel when passing the
stream fds to the consumer. However, closing the fd reuses the same
identifier for the next round, thus getting the same consumer
channel/streams as the previous one. This causes multi-session tracing
to only work for the first session, not the following ones.

So instead of doing a channel lookup on add channel and a stream lookup
upon add stream, we "steal" the identifier. We still lookup the channel
identifier upon stream add though: this means the sessiond needs to keep
the channel shm fd open until it has finished sending all stream fds to
the consumer. For kernel consumer, the update operation still does a
stream id lookup.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agolttng-sessiond: keep enabled/active state for sessions, cleanup enabled state for...
Mathieu Desnoyers [Wed, 16 Nov 2011 00:15:18 +0000 (19:15 -0500)] 
lttng-sessiond: keep enabled/active state for sessions, cleanup enabled state for events/channels

allows

lttng list
Available tracing sessions:
  1) test1 (/root/lttng-traces/test1-20111115-191312) [inactive]
  2) test2 (/root/lttng-traces/test2-20111115-191310) [active]

and

root@thinkos:~# lttng list test2
Tracing session test2: [active]
    Trace path: /root/lttng-traces/test2-20111115-191502

When events/channels/sessions enabled state is set to -1, show an empty
string instead of the meaningless "[enabled: -1]".

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agorculfhash: add missing braces around iteration macros pos parameter
Mathieu Desnoyers [Tue, 15 Nov 2011 23:35:28 +0000 (18:35 -0500)] 
rculfhash: add missing braces around iteration macros pos parameter

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agolttng-sessiond: keep track of UST consumer fd for all UST sessions.
Mathieu Desnoyers [Tue, 15 Nov 2011 03:40:54 +0000 (22:40 -0500)] 
lttng-sessiond: keep track of UST consumer fd for all UST sessions.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoChange malloc to zmalloc in lttng-sessiond code
David Goulet [Tue, 15 Nov 2011 20:39:37 +0000 (15:39 -0500)] 
Change malloc to zmalloc in lttng-sessiond code

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoCleanup and add comments to ust_app.c
David Goulet [Tue, 15 Nov 2011 20:23:14 +0000 (15:23 -0500)] 
Cleanup and add comments to ust_app.c

Mostly cleanup the code by moving static functions up and creating
wrapper function around the ustctl_* API calls.

Also, replace all hashtable iteration structure by cds each entry
macros.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoFix enabled state when listing UST events
David Goulet [Mon, 14 Nov 2011 21:56:58 +0000 (16:56 -0500)] 
Fix enabled state when listing UST events

NOTE: When listing all UST events from all registered apps, the enabled
state is set to -1 meaning that there is no enable/disable state
semantic at this point.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoMultiple fixes when cleaning app and UST sessions
David Goulet [Mon, 14 Nov 2011 21:46:28 +0000 (16:46 -0500)] 
Multiple fixes when cleaning app and UST sessions

Also adds event's attributes to the ust_app_event data structure.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoAdd important DEBUG statement
David Goulet [Mon, 14 Nov 2011 21:43:09 +0000 (16:43 -0500)] 
Add important DEBUG statement

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoCleanup trace ust destroy functions
David Goulet [Mon, 14 Nov 2011 19:41:48 +0000 (14:41 -0500)] 
Cleanup trace ust destroy functions

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoMerge branch 'master' of git://git.lttng.org/lttng-tools
David Goulet [Mon, 14 Nov 2011 17:11:17 +0000 (12:11 -0500)] 
Merge branch 'master' of git://git.lttng.org/lttng-tools

10 years agoAdd cleanup function for UST app
David Goulet [Mon, 14 Nov 2011 17:09:51 +0000 (12:09 -0500)] 
Add cleanup function for UST app

Also, those functions uses the new ustctl_release_object function from
the UST API.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoChange malloc to zmalloc on UST metadata creation
David Goulet [Mon, 14 Nov 2011 17:09:31 +0000 (12:09 -0500)] 
Change malloc to zmalloc on UST metadata creation

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoAdd hashtable destroy
David Goulet [Mon, 14 Nov 2011 17:08:29 +0000 (12:08 -0500)] 
Add hashtable destroy

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoFix possible NULL UST session on start trace
David Goulet [Mon, 14 Nov 2011 17:08:00 +0000 (12:08 -0500)] 
Fix possible NULL UST session on start trace

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agoFix indentation
David Goulet [Mon, 14 Nov 2011 15:26:37 +0000 (10:26 -0500)] 
Fix indentation

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
10 years agosessiond: don't link on lttng-ust-comm anymore
Mathieu Desnoyers [Mon, 14 Nov 2011 16:03:48 +0000 (11:03 -0500)] 
sessiond: don't link on lttng-ust-comm anymore

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix incorrect POPT_ARG_STRING usage
Mathieu Desnoyers [Mon, 14 Nov 2011 14:40:48 +0000 (09:40 -0500)] 
Fix incorrect POPT_ARG_STRING usage

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agolttng enable-events: fix argument parsing
Mathieu Desnoyers [Mon, 14 Nov 2011 14:31:22 +0000 (09:31 -0500)] 
lttng enable-events: fix argument parsing

We should only specify one of arg expected is a string/opt string _or_
that the callback needs to read it, but not both.

Causes some arguments to be skipped with some libpopt versions.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoFix debug message channel vs session name mixup
Mathieu Desnoyers [Mon, 14 Nov 2011 13:46:16 +0000 (08:46 -0500)] 
Fix debug message channel vs session name mixup

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
10 years agoRemove leftover debug message
Mathieu Desnoyers [Sun, 13 Nov 2011 21:11:02 +0000 (16:11 -0500)] 
Remove leftover debug message

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
This page took 0.062522 seconds and 4 git commands to generate.