qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] trace: seperate cold path of trace
@ 2025-06-01 18:12 Tanish Desai
  2025-06-01 18:12 ` [PATCH 1/3] trace/syslog: seperate cold paths of tracing functions Tanish Desai
                   ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: Tanish Desai @ 2025-06-01 18:12 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Hajnoczi, pbonzini, Mads Ynddal, Tanish Desai

This patch continues the optimize fast trace paths started in previous patch (trace/simple: seperate hot paths of tracing fucntions), which optimized the simple backend by moving its hot path to the header. Here, we apply the same pattern to the log, ftrace, and syslog backends.
The fast path remains in the header with minimal inline checks, while the backend-specific logic is now handled in dedicated `_log_trace_vhost_commit()`, `_ftrace_trace_vhost_commit()`, and `_syslog_trace_vhost_commit()` functions in the .c file.
While this doesn’t yield the same level of optimization as the simple backend , it improves performance on compilers where inlining is less reliable and reduces header bloat.
This change also improves code organization:
- All trace event checks are now centralized in headers
- All backend logic is contained in clearly named functions in the .c file
This makes the tracing infrastructure cleaner, more maintainable, and better optimized for diverse compiler behaviors.

Tanish Desai (3):
  trace/syslog: seperate cold paths of tracing functions
  trace/ftrace: seperate cold paths of tracing functions
  trace/log: seperate cold path of tracing functions

 scripts/tracetool/backend/ftrace.py | 44 +++++++++++++++++++++--------
 scripts/tracetool/backend/log.py    | 26 +++++++++++++++--
 scripts/tracetool/backend/syslog.py | 36 ++++++++++++++++++-----
 3 files changed, 85 insertions(+), 21 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-06-09 18:52 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-01 18:12 [PATCH 0/3] trace: seperate cold path of trace Tanish Desai
2025-06-01 18:12 ` [PATCH 1/3] trace/syslog: seperate cold paths of tracing functions Tanish Desai
2025-06-02 22:01   ` Stefan Hajnoczi
2025-06-05  3:02     ` Tanish Desai
2025-06-01 18:12 ` [PATCH 2/3] trace/ftrace: " Tanish Desai
2025-06-02 22:24   ` Stefan Hajnoczi
2025-06-05 13:57     ` Paolo Bonzini
2025-06-05 18:37       ` Stefan Hajnoczi
2025-06-05 18:49         ` Paolo Bonzini
2025-06-05 19:20           ` Daniel P. Berrangé
2025-06-05 21:24             ` Paolo Bonzini
2025-06-09 18:27           ` Stefan Hajnoczi
2025-06-09 18:50             ` Paolo Bonzini
2025-06-01 18:12 ` [PATCH 3/3] trace/log: seperate cold path " Tanish Desai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).