public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gdb-patches@sourceware.org
Subject: [PATCH 3/4] sim: trace: add STRACE_xxx_P macros
Date: Thu, 11 Jun 2015 15:58:00 -0000	[thread overview]
Message-ID: <1434038294-32159-3-git-send-email-vapier@gentoo.org> (raw)
In-Reply-To: <1434038294-32159-1-git-send-email-vapier@gentoo.org>

These are the parallel to the TRACE_xxx_P macros and fill out the full
set to match the existing debug one.

Committed.
---
 sim/common/ChangeLog   |  7 +++++++
 sim/common/sim-trace.h | 14 ++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 586f58d..35f08bb 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,5 +1,12 @@
 2015-06-11  Mike Frysinger  <vapier@gentoo.org>
 
+	* sim-trace.h (STRACE_ANY_P, STRACE_INSN_P, STRACE_DECODE_P,
+	STRACE_EXTRACT_P, STRACE_LINENUM_P, STRACE_MEMORY_P, STRACE_MODEL_P,
+	STRACE_ALU_P, STRACE_CORE_P, STRACE_EVENTS_P, STRACE_FPU_P,
+	STRACE_VPU_P, STRACE_BRANCH_P, STRACE_SYSCALL_P): Define.
+
+2015-06-11  Mike Frysinger  <vapier@gentoo.org>
+
 	* sim-trace.h (TRACE_USEFUL_MASK): Change to TRACE_xxx defines.
 
 2015-06-11  Mike Frysinger  <vapier@gentoo.org>
diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h
index 3d91aa9..5d6919a 100644
--- a/sim/common/sim-trace.h
+++ b/sim/common/sim-trace.h
@@ -193,6 +193,20 @@ typedef struct _trace_data {
   (WITH_TRACE_P (idx) && STATE_TRACE_FLAGS (sd)[idx] != 0)
 
 /* Non-zero if --trace-<xxxx> was specified for SD.  */
+#define STRACE_ANY_P(sd)	((WITH_TRACE) && (STATE_TRACE_DATA (sd)->trace_any_p))
+#define STRACE_INSN_P(sd)	STRACE_P (sd, TRACE_INSN_IDX)
+#define STRACE_DECODE_P(sd)	STRACE_P (sd, TRACE_DECODE_IDX)
+#define STRACE_EXTRACT_P(sd)	STRACE_P (sd, TRACE_EXTRACT_IDX)
+#define STRACE_LINENUM_P(sd)	STRACE_P (sd, TRACE_LINENUM_IDX)
+#define STRACE_MEMORY_P(sd)	STRACE_P (sd, TRACE_MEMORY_IDX)
+#define STRACE_MODEL_P(sd)	STRACE_P (sd, TRACE_MODEL_IDX)
+#define STRACE_ALU_P(sd)	STRACE_P (sd, TRACE_ALU_IDX)
+#define STRACE_CORE_P(sd)	STRACE_P (sd, TRACE_CORE_IDX)
+#define STRACE_EVENTS_P(sd)	STRACE_P (sd, TRACE_EVENTS_IDX)
+#define STRACE_FPU_P(sd)	STRACE_P (sd, TRACE_FPU_IDX)
+#define STRACE_VPU_P(sd)	STRACE_P (sd, TRACE_VPU_IDX)
+#define STRACE_BRANCH_P(sd)	STRACE_P (sd, TRACE_BRANCH_IDX)
+#define STRACE_SYSCALL_P(sd)	STRACE_P (sd, TRACE_SYSCALL_IDX)
 #define STRACE_DEBUG_P(sd)	STRACE_P (sd, TRACE_DEBUG_IDX)
 \f
 /* CPU tracing support.  */
-- 
2.4.1

  parent reply	other threads:[~2015-06-11 15:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11 15:58 [PATCH 1/4] sim: trace: create a common WITH_TRACE_P macro Mike Frysinger
2015-06-11 15:58 ` [PATCH 2/4] sim: trace: use existing defines for the useful mask Mike Frysinger
2015-06-11 15:58 ` Mike Frysinger [this message]
2015-06-11 15:58 ` [PATCH 4/4] sim: trace: centralize the system tracing Mike Frysinger

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=1434038294-32159-3-git-send-email-vapier@gentoo.org \
    --to=vapier@gentoo.org \
    --cc=gdb-patches@sourceware.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 read-only IMAP folder(s) and NNTP newsgroup(s).