summaryrefslogtreecommitdiff
path: root/scripts/tracetool/format/ust_events_c.py
AgeCommit message (Collapse)AuthorFilesLines
2017-01-31trace: switch to modular code generation for sub-directoriesDaniel P. Berrange1-1/+1
Introduce rules in the top level Makefile that are able to generate trace.[ch] files in every subdirectory which has a trace-events file. The top level directory is handled specially, so instead of creating trace.h, it creates trace-root.h. This allows sub-directories to include the top level trace-root.h file, without ambiguity wrt to the trace.g file in the current sub-dir. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170125161417.31949-7-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2016-10-12trace: introduce a formal group name for trace eventsDaniel P. Berrange1-1/+1
The declarations in the generated-tracers.h file are assuming there's only ever going to be one instance of this header, as they are not namespaced. When we have one header per event group, if a single source file needs to include multiple sets of trace events, the symbols will all clash. This change thus introduces a '--group NAME' arg to the 'tracetool' program. This will cause all the symbols in the generated header files to be given a unique namespace. If no group is given, the group name 'common' is used, which is suitable for the current usage where there is only one global trace-events file used for code generation. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Reviewed-by: Lluís Vilanova <vilanova@ac.upc.edu> Message-id: 1475588159-30598-21-git-send-email-berrange@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2016-03-22Clean up includes some moreMarkus Armbruster1-1/+0
Manually drop redundant includes that scripts/clean-includes misses, e.g. because they're hidden in generator programs, or they use the wrong kind of delimiter. Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-03-01trace: Add 'vcpu' event property to trace guest vCPULluís Vilanova1-0/+1
This property identifies events that trace vCPU-specific information. It adds a "CPUState*" argument to events with the property, identifying the vCPU raising the event. TCG translation events also have a "TCGv_env" implicit argument that is later used as the "CPUState*" argument at execution time. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Message-id: 145641861797.30295.6991314023181842105.stgit@localhost Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2016-02-23tracetool: Include osdep.h in generated-ust.cPeter Maydell1-0/+2
When generating the trace/generated-ust.c source file, make sure it includes osdep.h as its first include. This fixes compilation with --enable-trace-backends=ust Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1456240661-15422-1-git-send-email-peter.maydell@linaro.org Reviewed-by: Eric Blake <eblake@redhat.com>
2014-05-07trace: [tracetool] Minimize the amount of per-backend codeLluís Vilanova1-1/+4
Backends now only contain the essential backend-specific code, and most of the work is moved to frontend code. Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-05-07trace: [tracetool] Change format docs to point to the generated fileLluís Vilanova1-1/+1
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2014-02-19Modified the tracetool framework for LTTng 2.xMohamad Gebai1-0/+30
* A new format is required to generate definitions for ust tracepoints. Files ust_events_h.py and ust_events_c.py define common macros, while new function ust_events_h in events.py does the actual definition of each tracepoint. * ust.py generates the new interface for calling userspace tracepoints with LTTng 2.x, replacing trace_name(args) to tracepoint(name, args). * As explained in ust_events_c.py, -Wredundant-decls gives a warning when compiling with gcc 4.7 or older. This is specific to lttng-ust so for now use a pragma clause to avoid getting a warning. Signed-off-by: Mohamad Gebai <mohamad.gebai@polymtl.ca> Reviewed-by: Alex Bennée <alex@bennee.com> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>