Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ftrace: Support trace-cmd record mode #643

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Sep 7, 2023

  1. ftrace: Support trace-cmd record mode

    The current implementation of the FtraceCollector only supports using
    ftrace in its start-stop mode which keeps the traces in memory and then
    writes to file at the end. Trace-cmd also supports a different mode -
    record which writes to file periodically meaning that it allows
    recording traces that would exceed the 'start' mode buffer size in
    exchange for added noise.
    
    This commit adds support for selecting which mode trace-cmd should be
    run in. It adds a new collector parameter - 'trace_cmd_mode' which is
    used to distinguish between the two approaches.
    
    While at it, it also cleans up the collector in some places, e.g. the
    teardown() method.
    
    Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
    mrkajetanp committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    45af5f4 View commit details
    Browse the repository at this point in the history
  2. ftrace: Allow setting the interval for record mode

    The trace-cmd record mode allows setting the interval to determine how
    often it will write to the trace file. The default is 1000 (us, ie. 1ms).
    
    Add a collector parameter to allow setting that interval. This will only
    have an effect when trace_cmd_mode is 'record' as the option does not
    exist for 'start' mode.
    
    Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
    mrkajetanp committed Sep 7, 2023
    Configuration menu
    Copy the full SHA
    5ef563e View commit details
    Browse the repository at this point in the history