Import QEMU upstream snapshot d2e570c
Upstream: https://gitlab.com/qemu-project/qemu.git Upstream-Commit: d2e570cc0f97b936902a5b1b86b73c0f5998b475
This commit is contained in:
commit
cf256aa081
11315 files changed
+3598369
No files matched your search
@@ -0,0 +1,45 @@
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
"""
|
||||
LTTng User Space Tracing backend.
|
||||
"""
|
||||
|
||||
__author__ = "Lluís Vilanova <[email protected]>"
|
||||
__copyright__ = "Copyright 2012-2017, Lluís Vilanova <[email protected]>"
|
||||
__license__ = "GPL version 2 or (at your option) any later version"
|
||||
|
||||
__maintainer__ = "Stefan Hajnoczi"
|
||||
__email__ = "[email protected]"
|
||||
|
||||
|
||||
from tracetool import out
|
||||
|
||||
|
||||
PUBLIC = True
|
||||
|
||||
|
||||
def generate_h_begin(events, group):
|
||||
header = 'trace-ust-' + group + '.h'
|
||||
out('#include <lttng/tracepoint.h>',
|
||||
'#include "%s"' % header,
|
||||
'',
|
||||
'/* tracepoint_enabled() was introduced in LTTng UST 2.7 */',
|
||||
'#ifndef tracepoint_enabled',
|
||||
'#define tracepoint_enabled(a, b) true',
|
||||
'#endif',
|
||||
'')
|
||||
|
||||
|
||||
def generate_h(event, group):
|
||||
argnames = ", ".join(event.args.names())
|
||||
if len(event.args) > 0:
|
||||
argnames = ", " + argnames
|
||||
|
||||
out(' tracepoint(qemu, %(name)s%(tp_args)s);',
|
||||
name=event.name,
|
||||
tp_args=argnames)
|
||||
|
||||
|
||||
def generate_h_backend_dstate(event, group):
|
||||
out(' tracepoint_enabled(qemu, %(name)s) || \\',
|
||||
name=event.name)
|
||||
Reference in new issue
Block a user