Skip to content
Commits on Sep 28, 2011
  1. trace-cmd: Do not make trace-cmd have to build with ptrace

    Steven Rostedt committed with
    If ptrace is not available on an OS or arch, do not fail the build.
    Simply do not support the child tracing feature.
    
    Reported-by: Shawn Bohrer <sbohrer@rgmadvisors.com>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Commits on Sep 2, 2011
  1. trace-cmd: Allow report to ignore the date option

    Steven Rostedt committed with
    Add --nodate to trace-cmd report to ignore the date offset and give
    the raw timestamp count of the records.
    
    This also adds a flags field to the tracecmd_input struct and is set
    and cleared with tracecmd_set_flag() and tracecmd_clear_flag()
    respectively.
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  2. trace-cmd: Have timestamp offset set at cpu descriptor not record

    Steven Rostedt committed with
    The cpu descriptor is referenced by many functions, and needs to include
    the ts_offset, otherwise those functions will be incorrect. The record->ts
    is based on the cpu descriptor timestamp, so by modifying the cpu timestamp
    the record->ts is also modified.
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Commits on Aug 19, 2011
  1. trace-cmd: Record CPU trace stats before disable all

    Steven Rostedt committed with
    The disable_all() function is called before we print out the per cpu
    buffer stats. But the disable_all() function also resets those same stats
    so the output is useless.
    
    Instead of printing out the stats while tracing is still active (although
    tracing_on is off), record the stats into individual per cpu trace_seq
    buffers and then still print when all has been disabled.
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  2. trace-cmd: Show better data when reporting offsets

    Steven Rostedt committed with
    After a record, the offset of the CPU data is printed out for
    the user to see. This format is not very informative as the
    data just says "offset=27f000". Change this to a better
    format of:
    
    CPU0 data recorded at offset=0x2d5000
        319488 bytes in size
    CPU1 data recorded at offset=0x323000
        258048 bytes in size
    CPU2 data recorded at offset=0x362000
        454656 bytes in size
    CPU3 data recorded at offset=0x3d1000
        90112 bytes in size
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  3. @vnagarnaik

    trace-cmd: Update man pages for 'check-events' option

    vnagarnaik committed with
    There is a new option added to the 'report' target to check event
    formats of the events recorded in a trace data file. This patch updates
    the documentation in the man page.
    
    This patch also adds a new man page for 'check-events' target which
    verifies event formats on the local machine.
    
    Cc: Michael Rubin <mrubin@google.com>
    Cc: David Sharp <dhsharp@google.com>
    Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
    Link: http://lkml.kernel.org/r/1313091459-12049-5-git-send-email-vnagarnaik@google.com
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  4. @vnagarnaik

    trace-cmd: Add --check-events to report

    vnagarnaik committed with
    Add a new option --check-events to the report target which makes sure
    that the event formats in the trace data file can be parsed correctly on
    the machine that trace-cmd is running on. It returns EINVAL(22) for
    parsing failures and 0 for success.
    
    Cc: Michael Rubin <mrubin@google.com>
    Cc: David Sharp <dhsharp@google.com>
    Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
    Link: http://lkml.kernel.org/r/1313091459-12049-4-git-send-email-vnagarnaik@google.com
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  5. @vnagarnaik

    trace-cmd: Load plugins before parsing events in check-events

    vnagarnaik committed with
    The target check-events parses the event format strings on the local
    machine and returns whether they can be parsed or not. The parsing
    functionality is extended by loading plugins, if available.
    
    This patch loads the plugins before starting parsing of the event
    formats.
    
    Cc: Michael Rubin <mrubin@google.com>
    Cc: David Sharp <dhsharp@google.com>
    Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
    Link: http://lkml.kernel.org/r/1313091459-12049-3-git-send-email-vnagarnaik@google.com
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  6. @vnagarnaik

    trace-cmd: Don't call exit from tracecmd_blk_hack()

    vnagarnaik committed with
    Commit 9e0fd22 adds a hack to parse
    blktrace events. In tracecmd_blk_hack(), if the block trace events could
    not be parsed, it calls exit(0). Get rid of it and only return -1 to let
    the caller know that parsing failed.
    
    Cc: Michael Rubin <mrubin@google.com>
    Cc: David Sharp <dhsharp@google.com>
    Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
    Link: http://lkml.kernel.org/r/1313091459-12049-2-git-send-email-vnagarnaik@google.com
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  7. @vnagarnaik

    trace-cmd: Add function declaration to fix compile warning

    vnagarnaik committed with
    The function trace_util_ftrace_options() is not declared and causes a
    compile warning. This patch declares it in trace-cmd.h.
    
    Cc: Michael Rubin <mrubin@google.com>
    Cc: David Sharp <dhsharp@google.com>
    Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
    Link: http://lkml.kernel.org/r/1313091459-12049-1-git-send-email-vnagarnaik@google.com
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Commits on Jul 29, 2011
  1. trace-cmd: Simplify check-event pevent error handling

    Steven Rostedt committed with
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  2. parse-events: Let pevent_free() take a NULL pointer

    Steven Rostedt committed with
    The pevent_free() should ack like other free()s and allow a
    NULL pointer to be passed to it which makes error handling a bit
    easier for the users of pevent_free().
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  3. @vnagarnaik

    trace-cmd: Add parse error checking target

    vnagarnaik committed with
    Add another target 'check-events' which parses all the event formats and
    returns whether there are any issues with the print format strings.
    
    With an error in the format, the return value is 22 (EINVAL) and for
    success, it is 0.
    
    Cc: Michael Rubin <mrubin@google.com>
    Cc: David Sharp <dhsharp@google.com>
    Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
    Link: http://lkml.kernel.org/r/1311619188-4905-1-git-send-email-vnagarnaik@google.com
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  4. @nathanlynch

    trace-cmd: Close open fds on exec

    nathanlynch committed with
    trace-cmd's record mode allows child processes to inherit
    tracing-related file descriptors:
    
    $ trace-cmd record -esched: ls -l /proc/self/fd
    
    total 0
    lrwx------. 1 root root 64 May 20 12:44 0 -> /dev/pts/11
    lrwx------. 1 root root 64 May 20 12:44 1 -> /dev/pts/11
    lrwx------. 1 root root 64 May 20 12:44 2 -> /dev/pts/11
    lrwx------. 1 root root 64 May 20 12:44 3 -> /sys/kernel/debug/tracing/tracing_on
    l-wx------. 1 root root 64 May 20 12:44 4 -> /sys/kernel/debug/tracing/set_ftrace_pid
    l-wx------. 1 root root 64 May 20 12:44 5 -> /sys/kernel/debug/tracing/tracing_enabled
    lr-x------. 1 root root 64 May 20 12:44 6 -> /proc/31036/fd
    
    This can be problematic for applications (such as lxc) that
    interrogate their open file descriptors.
    
    Open these with O_CLOEXEC so they are not inherited.
    
    Signed-off-by: Nathan Lynch <ntl@pobox.com>
    Link: http://lkml.kernel.org/r/1305915732.2429.4.camel@orca.stoopid.dyndns.org
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  5. @vnagarnaik

    parse-events: Handle opcode parsing error

    vnagarnaik committed with
    If an invalid opcode is encountered in parsing event print format, the
    trace-cmd calls exit() without parsing any other events.
    
    This patch adds handling for such an error where the get_op_prio() is
    called. If the return value is -1, then the event print format parsing
    is skipped and parsing continues.
    
    Cc: Michael Rubin <mrubin@google.com>
    Cc: David Sharp <dhsharp@google.com>
    Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
    Link: http://lkml.kernel.org/r/1311619257-4970-1-git-send-email-vnagarnaik@google.com
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  6. @vnagarnaik

    parse-events: Support '+' opcode in print format

    vnagarnaik committed with
    The '+' opcode is not supported in the arguments for the print format.
    This patch adds support for it.
    
    Cc: Michael Rubin <mrubin@google.com>
    Cc: David Sharp <dhsharp@google.com>
    Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
    Link: http://lkml.kernel.org/r/1310785241-3799-4-git-send-email-vnagarnaik@google.com
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  7. @vnagarnaik

    parse-events: Handle invalid opcode parsing gracefully

    vnagarnaik committed with
    If an invalid opcode is encountered, trace-cmd exits with an error.
    Instead it can be treated as a soft error where the event's print format
    is not parsed and its binary data is dumped out.
    
    This patch adds a return value to arg_num_eval() function to indicate if
    the parsing was successful. If not, then the error is considered soft
    and the parsing of the offending event fails.
    
    Cc: Michael Rubin <mrubin@google.com>
    Cc: David Sharp <dhsharp@google.com>
    Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
    Link: http://lkml.kernel.org/r/1310785241-3799-2-git-send-email-vnagarnaik@google.com
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  8. trace-cmd: Fix warning for undeclared function trace_util_ftrace_options

    Steven Rostedt committed with
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Commits on Jun 29, 2011
  1. @vnagarnaik

    trace-cmd: Add check for truncated files

    vnagarnaik committed with
    If the trace data file that is being read is truncated, mmap'ing its
    non-existent page does not give any error. When the page is read, the
    process dies with a SIGBUS.
    
    This patch adds a file size check while initializing the trace data and
    makes sure that the file size matches the expected size; otherwise an
    error is returned.
    
    Cc: Michael Rubin <mrubin@google.com>
    Cc: David Sharp <dhsharp@google.com>
    Signed-off-by: Vaibhav Nagarnaik <vnagarnaik@google.com>
    Link: http://lkml.kernel.org/r/1308615578-556-1-git-send-email-vnagarnaik@google.com
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  2. trace-cmd: Use size of record to determine kernel stack trace

    Steven Rostedt committed with
    The kernel stack trace may soon become dynamic, and the size
    will depend on the size of the record and not the size of
    the stack array. Use the size of the record to determine the
    end of the stack output instead of the array.
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  3. trace-cmd: Allow use of enabling the nop tracer

    Steven Rostedt committed with
    For those cases that we just want to enable tracing because
    we want to view trace_printk()s in the kernel or for whatever,
    allow the nop tracer to be enabled.
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Commits on Jun 8, 2011
  1. trace-cmd: Add hack to ignore ARM '$x' functions

    Steven Rostedt committed with
    Some ARM boards add '$x' symbols into the kallsyms file:
    
    00000000bf0007e8 $a [cfg80211]
    00000000bf000890 $a [cfg80211]
    00000000bf000a30 $d [cfg80211]
    00000000bf000a40 $a [cfg80211]
    00000000bf000e78 $d [cfg80211]
    00000000bf000e88 $a [cfg80211]
    00000000bf0011f8 $d [cfg80211]
    00000000bf001244 $a [cfg80211]
    00000000bf0012a8 $a [cfg80211]
    00000000bf00131c $a [cfg80211]
    00000000bf001340 $a [cfg80211]
    00000000bf00146c $d [cfg80211]
    
    Unfortunately, trace-cmd seems to pick these for the function
    names it reports, making the function names totally useless.
    
    Add a hack to not include these names in the function table of
    trace-cmd.
    
    Reported-by: Luciano Coelho <coelho@ti.com>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Commits on Apr 18, 2011
  1. trace-graph: Fix saved pointer corruption in update_last_record()

    Steven Rostedt committed with
    The saved pointer was created with tracecmd_peek_data() and then set_cpu_to_time()
    was called freeing the saved pointer. We could simply reference the pointer if
    need be, but using tracecmd_read_data() is a better solution.
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  2. trace-cmd: Release handle in proper location in trace-output.c

    Steven Rostedt committed with
    tracecmd_append_cpu_data() does not create the handle and should not
    release it. Move the release of the handle to the location that created it:
    
    tracecmd_create_file_glob()
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Commits on Mar 30, 2011
  1. trace-cmd: Print an error if record exec fails

    Steven Rostedt committed with
    Currently if the exec fails in trace-cmd record, it silently
    exits without letting the user know. Add a big message telling
    the user if the exec fails.
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Commits on Mar 22, 2011
  1. Fix address of the Free Software Foundation

    Uwe Kleine-König committed with
    Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Commits on Mar 18, 2011
  1. trace-cmd: Add ftrace options with fgraph tailprint option

    Steven Rostedt committed with
    Added internal options for ftrace, and included a fgraph:tailprint
    option that will print the function names at the function exit.
    When the option is set, instead of just '}' the name will
    be added '} /* func_name */'
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  2. trace-cmd: Fix record of function_graph

    Steven Rostedt committed with
    For safety reasons we always set ftrace_stack_trace to zero when
    starting function tracer. But we seem to be doing that for
    function_graph tracer as well, where that option does not exist.
    Don't fail if it does not exist, quietly move on.
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  3. parse-events: fold me

    Steven Rostedt committed with
  4. trace-cmd: Add trace-cmd options

    Steven Rostedt committed with
    Add trace-cmd options that reads all the plugins and lists
    the available options for trace-cmd report.
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  5. trace-cmd: Add -O to trace-cmd report to pass options to plugins

    Steven Rostedt committed with
    The -O field now passes options to the plugins. The format is of:
    
    	-O [plugin:]var[=val]
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  6. trace-cmd: Add utility to add options to plugins

    Steven Rostedt committed with
    Added trace_util_add_option() and trace_util_read_plugin_options();
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  7. parse-events: Add names for plugin options

    Steven Rostedt committed with
    Add PEVENT_PLUGIN_ALIAS and PEVENT_PLUGIN_OPTIONS for
    plugins to use.
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  8. trace-cmd: Error on record if plugin given does not exist

    Steven Rostedt committed with
    If a bad event is given, trace-cmd record fails.
    But if a bad plugin name is given it continues and does nothing.
    
    If a bad plugin name is given it should fail and report an error.
    
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
  9. trace-cmd-record: Add missing put of path name in set_buffer_size()

    Steven Rostedt committed with
    Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Something went wrong with that request. Please try again.