1. 27 Oct, 2021 2 commits
    • Kalesh Singh's avatar
      tracing: Add support for creating hist trigger variables from literal · 52cfb373
      Kalesh Singh authored
      Currently hist trigger expressions don't support the use of numeric
      literals:
      	e.g. echo 'hist:keys=common_pid:x=$y-1234'
      		--> is not valid expression syntax
      
      Having the ability to use numeric constants in hist triggers supports
      a wider range of expressions for creating variables.
      
      Add support for creating trace event histogram variables from numeric
      literals.
      
      	e.g. echo 'hist:keys=common_pid:x=1234,y=size-1024' >> event/trigger
      
      A negative numeric constant is created, using unary minus operator
      (parentheses are required).
      
      	e.g. echo 'hist:keys=common_pid:z=-(2)' >> event/trigger
      
      Constants can be used with division/multiplication (added in the
      next patch in this series) to implement granularity filters for frequent
      trace events. For instance we can limit emitting the rss_stat
      trace event to when there is a 512KB cross over in the rss size:
      
        # Create a synthetic event to monitor instead of the high frequency
        # rss_stat event
        echo 'rss_stat_throttled unsigned int mm_id; unsigned int curr;
      	int member; long size' >> tracing/synthetic_events
      
        # Create a hist trigger that emits the synthetic rss_stat_throttled
        # event only when the rss size crosses a 512KB boundary.
        echo 'hist:keys=keys=mm_id,member:bucket=size/0x80000:onchange($bucket)
            .rss_stat_throttled(mm_id,curr,member,size)'
              >> events/kmem/rss_stat/trigger
      
      A use case for using constants with addition/subtraction is not yet
      known, but for completeness the use of constants are supported for all
      operators.
      
      Link: https://lkml.kernel.org/r/20211025200852.3002369-2-kaleshsingh@google.comSigned-off-by: default avatarKalesh Singh <kaleshsingh@google.com>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      52cfb373
    • Masami Hiramatsu's avatar
      selftests/ftrace: Stop tracing while reading the trace file by default · 25b95138
      Masami Hiramatsu authored
      Stop tracing while reading the trace file by default, to prevent
      the test results while checking it and to avoid taking a long time
      to check the result.
      If there is any testcase which wants to test the tracing while reading
      the trace file, please override this setting inside the test case.
      
      This also recovers the pause-on-trace when clean it up.
      
      Link: https://lkml.kernel.org/r/163529053143.690749.15365238954175942026.stgit@devnote2Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      25b95138
  2. 26 Oct, 2021 17 commits
  3. 22 Oct, 2021 7 commits
  4. 21 Oct, 2021 12 commits
  5. 20 Oct, 2021 2 commits