Skip to content
  1. Oct 06, 2020
  2. Oct 03, 2020
  3. Sep 28, 2020
    • Steven Rostedt (VMware)'s avatar
      x86: Use tracepoint_enabled() for msr tracepoints instead of open coding it · fdb46fae
      Steven Rostedt (VMware) authored
      7f47d8cc
      
       ("x86, tracing, perf: Add trace point for MSR accesses") added
      tracing of msr read and write, but because of complexity in having
      tracepoints in headers, and even more so for a core header like msr.h, not
      to mention the bloat a tracepoint adds to inline functions, a helper
      function is needed to be called from the header.
      
      Use the new tracepoint_enabled() macro in tracepoint-defs.h to test if the
      tracepoint is active before calling the helper function, instead of open
      coding the same logic, which requires knowing the internals of a tracepoint.
      
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      fdb46fae
  4. Sep 26, 2020
    • Steven Rostedt (VMware)'s avatar
      mm/page_ref: Convert the open coded tracepoint enabled to the new helper · c65fc227
      Steven Rostedt (VMware) authored
      
      
      As more use cases of checking if a tracepoint is enabled in a header are
      coming to fruition, a helper macro, tracepoint_enabled(), has been added to
      check if a tracepoint is enabled or not, and can be used with minimal header
      requirements (avoid "include hell"). Convert the page_ref logic over to the
      new helper macro.
      
      Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
      Cc: Michal Nazarewicz <mina86@mina86.com>
      Cc: Vlastimil Babka <vbabka@suse.cz>
      Cc: Minchan Kim <minchan@kernel.org>
      Cc: Mel Gorman <mgorman@techsingularity.net>
      Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
      Cc: Arnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      c65fc227
    • Steven Rostedt (VMware)'s avatar
      tracepoints: Add helper to test if tracepoint is enabled in a header · afbe7973
      Steven Rostedt (VMware) authored
      
      
      As tracepoints are discouraged from being added in a header because it can
      cause side effects if other tracepoints are in headers, as well as bloat the
      kernel as the trace_<tracepoint>() function is not a small inline, the common
      workaround is to add a function call that calls a wrapper function in a
      C file that then calls the tracepoint. But as function calls add overhead,
      this function should only be called when the tracepoint in question is
      enabled. To get around this overhead, a static_branch can be used to only
      have the tracepoint wrapper get called when the tracepoint is enabled.
      
      Add a tracepoint_enabled(tp) macro that gets passed the name of the
      tracepoint, and this becomes a static_branch that is enabled when the
      tracepoint is enabled and is a nop when the tracepoint is disabled.
      
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      afbe7973
    • Masami Hiramatsu's avatar
      tracing/boot: Initialize per-instance event list in early boot · 720dee53
      Masami Hiramatsu authored
      Initialize per-instance event list in early boot time (before
      initializing instance directory on tracefs). This fixes boot-time
      tracing to correctly handle the boot-time per-instance settings.
      
      Link: https://lkml.kernel.org/r/160096560826.182763.17110991546046128881.stgit@devnote2
      
      Fixes: 4114fbfd
      
       ("tracing: Enable creating new instance early boot")
      Signed-off-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
      Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
      720dee53
  5. Sep 22, 2020
  6. Sep 19, 2020