Age | Commit message (Collapse) | Author | Files | Lines |
|
stdout is not used anymore.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1412933690-25576-14-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
The log file is '/var/log/rasd.log'; the data file
is '/var/log/rasd.data'.
Note: all debug and informational messages go to the log
file; stderr is not used anymore.
Boris:
- s/open_output_files/open_log_files/g
- cleanup in the error case in open_log_files
- move success message to the end of daemonize(),
after we've passed all checks
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1412933690-25576-13-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
The process is put in the background and is detached from the
TTYs. The process working dir is set to '/'.
stdin, stdout and stderr are closed and cannot be used anymore.
Note: the config file 'rasd.cfg' is expected in the working
dir.
Boris:
- simplify error paths
- cleanup excessive comments
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1412933690-25576-12-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
Read the mmapped buffers and dump out events in the following format:
<sys>:<name>: <kernel format>\n
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1412933690-25576-11-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
The ID field of every event is included in the event format. Use the ID
as provided by the format parsing code.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1412933690-25576-10-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
Parse the events format from debugfs entry, i.e.
(debugfs)/tracing/events/<sys>/<name>/format.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1412933690-25576-9-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
Added in order to have a stand-alone build. Ultimately
rasd will need to link the traceevent lib from the kernel.
Files copied from:
. tools/lib/traceevent/event-parse.h,
. tools/lib/traceevent/event-parse.c,
. include/linux/trace_seq.h,
. tools/lib/traceevent/trace-seq.c.
and adapted for the build to succeed.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1412933690-25576-8-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
Map the events buffers on all CPUs; set cpu and threads maps in evlist.
The maps are used to parse the per-cpu and per-thread events.
Note: rasd performs system-wide tracing, however at least one
thread mapping is required. Create one thread mapping for the
current PID.
Boris:
- make add_tp_event() void
- cleanup excessive comments
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1412933690-25576-7-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
Every event has an internal id calculated, it is used to map the
requested events to the received ones.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1412933690-25576-6-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
The file 'rasd.cfg' is parsed for options:
.the events to enable are stored line by line. The format is 'sys:name',
.a line starting with '#' is a comment and is ignored,
.a line full of spaces and/or tabs is empty and is ignored.
Boris: rewrite cfg_valid_line() to use regex(3). We want to select only
the "interesting" lines and ignore everything else.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1412933690-25576-4-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
rasd.cfg config file with event in the 'sys:name' format.
Mutliple events can be specified, line by line.
A line starting with '#' is considered as a comment and is ignored.
A line full of spaces and/or tabs is empty and is ignored.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1412933690-25576-5-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
Look for the requested tracepoint from the name and
add it to the list of events to enable.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1412933690-25576-3-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
... to manage events' attributes.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1412933690-25576-2-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
To have a nicer git status output.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1410516745-22131-7-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
Used to look for requested events in debugfs.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1410164799-22589-2-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
Use the memory barriers and cpu_relax from the linux kernel perf tool
code at tools/perf/perf-sys.h.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1407425992-5657-3-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
Use the memory barriers and cpu_relax from the linux kernel perf tool
code at tools/perf/perf-sys.h.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1407425992-5657-2-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
Use the standard include file.
Signed-off-by: Jean Pihet <jean.pihet@linaro.org>
Link: http://lkml.kernel.org/r/1407425992-5657-1-git-send-email-jean.pihet@linaro.org
Signed-off-by: Borislav Petkov <bp@suse.de>
|
|
Signed-off-by: Borislav Petkov <bp@suse.de>
|