From: Lluís <xscript@gmx.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [RFC][PATCH v1 0/4] trace-gen: support for trace points in code-generation routines
Date: Wed, 03 Nov 2010 21:02:33 +0100 [thread overview]
Message-ID: <20101103200233.6599.50130.stgit@ginnungagap.bsc.es> (raw)
Adds a new optional keyword ("gen") to the syntax in "trace-events". When
specified, this event property will generate an extra set of functions that
provide the ability to inject trace points into TCG-generated code. Note that
the regular backend-dependant functions will also be generated.
The extra files generated, and their functions are:
- trace-helper.h
Declares a 'trace_proxy_##name' TCG helper for each affected trace event.
- trace-helper.c
Defines a 'trace_proxy_##name' TCG helper for each affected trace event, which
simply calls 'trace_##name'.
Note that this scheme neatly blends with the "instrument" property.
- trace-gen.h
Defines a 'trace_gen_##name##_backend' function for each affected trace event,
which handles all the (de)allocation of TCG temporaries and calls
'gen_helper_trace_proxy_##name'.
If the "instrument" property is not present, 'trace_gen_##name' is defined as
an alias.
This file is instended to be included instead of "trace.h" for generating TCG
calls to trace points.
In order to fully exploit the information available during TCG code generation,
trace events with the "gen" property can also use TCG data types (e.g.,
TCG_ptr), which are gracefully handled by 'tracetool' when generating the
"trace.h" and "trace.c" files.
TODO:
* Handle TCGv_tl and target_long/target_ulong
Signed-off-by: Lluís Vilanova <vilanova@ac.upc.edu>
---
Lluís Vilanova (4):
trace-gen: gracefully handle TCG types in "trace-events"
trace-gen: auto-generate TCG helper routines for tracing
trace-gen: [all] include "trace-helper.h" on all "helper.h" files
trace-gen: auto-generate wrappers to call TCG trace helpers
.gitignore | 2
Makefile | 21 ++-
Makefile.target | 5 -
target-alpha/helper.h | 2
target-arm/helper.h | 2
target-cris/helper.h | 2
target-i386/helper.h | 2
target-m68k/helper.h | 2
target-microblaze/helper.h | 2
target-mips/helper.h | 2
target-ppc/helper.h | 2
target-sh4/helper.h | 2
target-sparc/helper.h | 2
trace-events | 8 +
tracetool | 366 +++++++++++++++++++++++++++++++++++++++++++-
15 files changed, 409 insertions(+), 13 deletions(-)
next reply other threads:[~2010-11-03 20:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-03 20:02 Lluís [this message]
2010-11-03 20:02 ` [Qemu-devel] [PATCH v1 1/4] trace-gen: gracefully handle TCG types in "trace-events" Lluís
2010-11-03 20:02 ` [Qemu-devel] [PATCH v1 2/4] trace-gen: auto-generate TCG helper routines for tracing Lluís
2010-11-03 20:02 ` [Qemu-devel] [PATCH v1 3/4] trace-gen: [all] include "trace-helper.h" on all "helper.h" files Lluís
2010-11-03 20:03 ` [Qemu-devel] [PATCH v1 4/4] trace-gen: auto-generate wrappers to call TCG trace helpers Lluís
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101103200233.6599.50130.stgit@ginnungagap.bsc.es \
--to=xscript@gmx.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).