lttng-tools.git
13 years agoFix perf hw cache counter config values
Mathieu Desnoyers [Sat, 23 Jul 2011 08:36:38 +0000 (04:36 -0400)] 
Fix perf hw cache counter config values

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoUpdate version to 2.0-pre2 v2.0-pre2
David Goulet [Fri, 22 Jul 2011 20:20:08 +0000 (16:20 -0400)] 
Update version to 2.0-pre2

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoAdd missing fprintf format
David Goulet [Fri, 22 Jul 2011 20:00:26 +0000 (16:00 -0400)] 
Add missing fprintf format

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoUI print cleanup
Mathieu Desnoyers [Fri, 22 Jul 2011 19:06:23 +0000 (15:06 -0400)] 
UI print cleanup

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoUse "probe" rather than "kprobe" for UI
Mathieu Desnoyers [Fri, 22 Jul 2011 19:04:48 +0000 (15:04 -0400)] 
Use "probe" rather than "kprobe" for UI

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoUpdate quickstart for new perf UI
Mathieu Desnoyers [Fri, 22 Jul 2011 19:04:30 +0000 (15:04 -0400)] 
Update quickstart for new perf UI

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoUpdate handling of perf counters in add-context
Mathieu Desnoyers [Fri, 22 Jul 2011 18:38:58 +0000 (14:38 -0400)] 
Update handling of perf counters in add-context

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoRemove assert from kconsumerd (multi-fd handling is ok)
Mathieu Desnoyers [Fri, 22 Jul 2011 18:38:17 +0000 (14:38 -0400)] 
Remove assert from kconsumerd (multi-fd handling is ok)

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoCleanup header
Mathieu Desnoyers [Fri, 22 Jul 2011 18:05:53 +0000 (14:05 -0400)] 
Cleanup header

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoAdd string options for add-context
David Goulet [Thu, 21 Jul 2011 20:40:24 +0000 (16:40 -0400)] 
Add string options for add-context

List of strings can be used for context type, perf type and perf id.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoFix sending fd through sendmsg/recvmsg ancillary data
Mathieu Desnoyers [Thu, 21 Jul 2011 18:16:05 +0000 (14:16 -0400)] 
Fix sending fd through sendmsg/recvmsg ancillary data

ltt-kconsumerd was only reading a "char" rather than an integer. It
worked fine on little endian for values below 256, and failed on big
endian machines (always reading "0").

Also cleanup msg initialization.
Also perform final msg.msg_controllen = cmsg->cmsg_len; after memcpy, as
done in cmsg(3) example (extra safety).

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoImprove add-context command
David Goulet [Thu, 21 Jul 2011 16:07:43 +0000 (12:07 -0400)] 
Improve add-context command

Better multiple context type handling using a linked list at args
parsing.

Change some error message.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoUpdate and add to the quickstart guide
David Goulet [Thu, 21 Jul 2011 14:47:55 +0000 (10:47 -0400)] 
Update and add to the quickstart guide

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoMerge branch 'master' of git://git.lttng.org/lttng-tools
David Goulet [Wed, 20 Jul 2011 21:18:58 +0000 (17:18 -0400)] 
Merge branch 'master' of git://git.lttng.org/lttng-tools

13 years agoRename binary installation path define
David Goulet [Wed, 20 Jul 2011 21:18:07 +0000 (17:18 -0400)] 
Rename binary installation path define

INSTALL_PATH --> INSTALL_BIN_PATH

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoFix double-unlock in kconsumerd_find_session_fd()
Mathieu Desnoyers [Wed, 20 Jul 2011 21:11:51 +0000 (17:11 -0400)] 
Fix double-unlock in kconsumerd_find_session_fd()

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoFix error handling
David Goulet [Wed, 20 Jul 2011 20:40:41 +0000 (16:40 -0400)] 
Fix error handling

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoRemove format strings warnings when compiling on 32 bits
Simon Marchi [Wed, 20 Jul 2011 19:31:49 +0000 (15:31 -0400)] 
Remove format strings warnings when compiling on 32 bits

On 32 bits, %lu expects a 32 bits integer, so changed some %lu for PRIu64 when printing a 64 bits integer.

Signed-off-by: Simon Marchi <simon.marchi@polymtl.ca>
13 years agoUse install path for exec()
David Goulet [Wed, 20 Jul 2011 20:17:29 +0000 (16:17 -0400)] 
Use install path for exec()

Add INSTALL_PATH define for binary execution path.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoFix set but no use variables warnings
David Goulet [Wed, 20 Jul 2011 19:47:11 +0000 (15:47 -0400)] 
Fix set but no use variables warnings

Shown with gcc >= 4.6.0

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoUpdate version to 2.0-pre1 v2.0-pre1
David Goulet [Wed, 20 Jul 2011 16:38:53 +0000 (12:38 -0400)] 
Update version to 2.0-pre1

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoUpdate authors
David Goulet [Wed, 20 Jul 2011 16:18:59 +0000 (12:18 -0400)] 
Update authors

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoChange bzip2 for dist tarball
David Goulet [Wed, 20 Jul 2011 15:39:36 +0000 (11:39 -0400)] 
Change bzip2 for dist tarball

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoFix session trace output message
David Goulet [Wed, 20 Jul 2011 15:38:31 +0000 (11:38 -0400)] 
Fix session trace output message

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoAdd usage section to README
David Goulet [Wed, 20 Jul 2011 15:28:34 +0000 (11:28 -0400)] 
Add usage section to README

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoFix README and add doc to tarball
David Goulet [Wed, 20 Jul 2011 15:07:31 +0000 (11:07 -0400)] 
Fix README and add doc to tarball

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoFix build system for valid make dist
David Goulet [Wed, 20 Jul 2011 14:23:16 +0000 (10:23 -0400)] 
Fix build system for valid make dist

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoRemove debug mode at kconsumerd exec
David Goulet [Wed, 20 Jul 2011 13:41:49 +0000 (09:41 -0400)] 
Remove debug mode at kconsumerd exec

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoFix wrong spacing
David Goulet [Mon, 18 Jul 2011 22:14:08 +0000 (18:14 -0400)] 
Fix wrong spacing

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoFix invalid channel creation
David Goulet [Mon, 18 Jul 2011 21:55:58 +0000 (17:55 -0400)] 
Fix invalid channel creation

Also add a message when all events are successfully enabled.

Reported-by: Simon Marchi <simon.marchi@ericsson.com>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoMake the receiving thread non blocking
Julien Desfossez [Sun, 17 Jul 2011 16:46:08 +0000 (12:46 -0400)] 
Make the receiving thread non blocking

Avoids the risk of blocking indefinitely on the command socket when the
ltt-sessiond is not available and allow the signal handler to stop the
process when necessary.

Signed-off-by: Julien Desfossez <julien.desfossez@polymtl.ca>
13 years agoChange licensing
David Goulet [Mon, 18 Jul 2011 21:49:02 +0000 (17:49 -0400)] 
Change licensing

Public API lttng.h and liblttngctl.c is licensed LGPLv2.1.

The rest of the code is licensing GPLv2 and NOT later.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoChange lttng.h API char to const char
David Goulet [Mon, 18 Jul 2011 21:17:25 +0000 (17:17 -0400)] 
Change lttng.h API char to const char

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoNew public API for lttng control
David Goulet [Mon, 18 Jul 2011 20:47:58 +0000 (16:47 -0400)] 
New public API for lttng control

Introduce the lttng domain that is used to identify the tracer.

Remove all 'kernel' from the functions name and now take the domain
struct as first parameter.

Add channel feature is removed and merged with enable-channel.

Move kernel specific data structure from lttng.h to lttng-kernel.h which
is copied from the LTTng kernel modules ABI. Genereic structures are
used to create a generic view of lttng event and attributes (agnostif of
the Kernel and user-space).

Default channel is NOT created unless it is needed.

A lot of comments has been added to lttng.h

Fix a bug in the liblttngctl. A return value was not set correctly.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoRemove connect/disconnect sessiond from lttng API
David Goulet [Mon, 18 Jul 2011 14:57:49 +0000 (10:57 -0400)] 
Remove connect/disconnect sessiond from lttng API

Those actions are made internally when a command to the session daemon
is done so no need for them to be public.

Move code around to make things clearer and fit static declaration.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoquickstart guide review
Mathieu Desnoyers [Mon, 18 Jul 2011 15:43:52 +0000 (11:43 -0400)] 
quickstart guide review

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 years agoMakes kprobe attribute specific to kernel
David Goulet [Mon, 18 Jul 2011 14:50:47 +0000 (10:50 -0400)] 
Makes kprobe attribute specific to kernel

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoFix tracing events data structure
David Goulet [Mon, 18 Jul 2011 14:37:48 +0000 (10:37 -0400)] 
Fix tracing events data structure

Make lttng_kernel_output generic to user-space and kernel becoming
lttng_event_output.

Renaming enum to fit kernel ABI.

Add comments.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoRemove libustctl and libustcomm
David Goulet [Mon, 18 Jul 2011 00:34:02 +0000 (20:34 -0400)] 
Remove libustctl and libustcomm

Those libs are part of the soon to be deprecated user-space tracer. The
code is removed but not the directories and Makefile.am.

lttng-tools will only support UST 2.0 which is not yet released at this
point in time. Thus, this is not useful anymore and will be readded
later on to support the new user-space tracer.

Also disable a small portion of code in the session daemon that uses
libustctl. This code however remains relevant for future UST
integration.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoRemove not working test
David Goulet [Mon, 18 Jul 2011 00:26:45 +0000 (20:26 -0400)] 
Remove not working test

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoAdd quick start tracing guide
David Goulet [Mon, 18 Jul 2011 00:21:45 +0000 (20:21 -0400)] 
Add quick start tracing guide

First draft of a quick start guide. For now, there is only the kernel
tracing guide since ust 2.0 is not released at this point.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoAdd session daemon model RFC
David Goulet [Sun, 17 Jul 2011 23:43:33 +0000 (19:43 -0400)] 
Add session daemon model RFC

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoAdd short option for no sessiond feature
David Goulet [Sun, 17 Jul 2011 23:35:20 +0000 (19:35 -0400)] 
Add short option for no sessiond feature

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoAdd error message if event not found
David Goulet [Sun, 17 Jul 2011 17:10:44 +0000 (13:10 -0400)] 
Add error message if event not found

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoFix return code to 0 on success and 1 on error
David Goulet [Sun, 17 Jul 2011 17:04:14 +0000 (13:04 -0400)] 
Fix return code to 0 on success and 1 on error

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoFix session list locking
David Goulet [Sun, 17 Jul 2011 16:50:25 +0000 (12:50 -0400)] 
Fix session list locking

The session list lock was not used correctly when a client requested the
session list. The session counter and iteration over the list is
protected by a single critical section now.

Move get_lttng_sessions to the main.c in order to remove lttng.h
dependency to session.c/.h and to make easier for the session list
locking.

Remove the get_session_count which is useless since the counter is now
in the session list structure. Access the counter by locking the list
and reading 'count'.

This adds two function to lock and unlock the session list.

Reported-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoFix bad cleanup of context structure
David Goulet [Sun, 17 Jul 2011 16:23:54 +0000 (12:23 -0400)] 
Fix bad cleanup of context structure

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoFix bad exit conditions
David Goulet [Sat, 16 Jul 2011 22:22:16 +0000 (18:22 -0400)] 
Fix bad exit conditions

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoClean exit cleanup of the session daemon
David Goulet [Sat, 16 Jul 2011 22:05:32 +0000 (18:05 -0400)] 
Clean exit cleanup of the session daemon

Remove the pthread_cancel and introduce the *thread_quit_pipe* that is
used to tell a thread that it should exit cleanly. This pipe is added to
the pollfd set of the thread and has to be close in order to trigger the
clean exit of the threads.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoAdd version command
David Goulet [Sat, 16 Jul 2011 19:51:11 +0000 (15:51 -0400)] 
Add version command

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoForce to specify the type with add-context
David Goulet [Sat, 16 Jul 2011 19:36:53 +0000 (15:36 -0400)] 
Force to specify the type with add-context

-t, --type must be used or the help shows up. Also allowed multiple -t
to enable multiple context with one command.

Fix a memory leak.

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoAdd comment for the session list lock
David Goulet [Sat, 16 Jul 2011 19:22:24 +0000 (15:22 -0400)] 
Add comment for the session list lock

Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agoFix double mutex unlock
David Goulet [Sat, 16 Jul 2011 19:13:55 +0000 (15:13 -0400)] 
Fix double mutex unlock

Reported-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Signed-off-by: David Goulet <david.goulet@polymtl.ca>
13 years agolttng command line UI: fix allocation/free
Mathieu Desnoyers [Sat, 16 Jul 2011 16:06:21 +0000 (12:06 -0400)] 
lttng command line UI: fix allocation/free

Freeing non-dynamically allocated memory is never a good idea.
Also fixing 2 memory leaks.

Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
13 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>
This page took 0.040545 seconds and 4 git commands to generate.