Public backends are those printed by "--list-backends" and thus considered valid
by the configure script.
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
arg_format = arg
elif opt == "--list-backends":
arg_format = arg
elif opt == "--list-backends":
- backends = tracetool.backend.get_list()
- out(", ".join([ b for b,_ in backends ]))
+ public_backends = tracetool.backend.get_list(only_public = True)
+ out(", ".join([ b for b,_ in public_backends ]))
sys.exit(0)
elif opt == "--check-backend":
check_backend = True
sys.exit(0)
elif opt == "--check-backend":
check_backend = True
All backends must generate their contents through the 'tracetool.out' routine.
All backends must generate their contents through the 'tracetool.out' routine.
+Backend attributes
+------------------
+
+========= ====================================================================
+Attribute Description
+========= ====================================================================
+PUBLIC If exists and is set to 'True', the backend is considered "public".
+========= ====================================================================
+
+
Backend functions
-----------------
Backend functions
-----------------
+def get_list(only_public = False):
"""Get a list of (name, description) pairs."""
res = [("nop", "Tracing disabled.")]
modnames = []
"""Get a list of (name, description) pairs."""
res = [("nop", "Tracing disabled.")]
modnames = []
continue
module = module[1]
continue
module = module[1]
+ public = getattr(module, "PUBLIC", False)
+ if only_public and not public:
+ continue
+
doc = module.__doc__
if doc is None:
doc = ""
doc = module.__doc__
if doc is None:
doc = ""
from tracetool import out
from tracetool import out
PROBEPREFIX = None
def _probeprefix():
PROBEPREFIX = None
def _probeprefix():
from tracetool import out
from tracetool import out
def is_string(arg):
strtype = ('const char*', 'char*', 'const char *', 'char *')
if arg.lstrip().startswith(strtype):
def is_string(arg):
strtype = ('const char*', 'char*', 'const char *', 'char *')
if arg.lstrip().startswith(strtype):
from tracetool import out
from tracetool import out
def c(events):
out('#include "trace.h"',
'',
def c(events):
out('#include "trace.h"',
'',
from tracetool import out
from tracetool import out
def c(events):
out('#include <ust/marker.h>',
'#undef mutex_lock',
def c(events):
out('#include <ust/marker.h>',
'#undef mutex_lock',