From: Yao Qi <qiyaoltc@gmail.com>
To: "Marcin Kościelnicki" <koriakin@0x04.net>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] gdb/testsuite/gdb.trace: Deduplicate set_point assembly.
Date: Wed, 11 Nov 2015 08:42:00 -0000 [thread overview]
Message-ID: <86pozhvseg.fsf@gmail.com> (raw)
In-Reply-To: <1447154499-22247-2-git-send-email-koriakin@0x04.net> ("Marcin \=\?utf-8\?Q\?Ko\=C5\=9Bcielnicki\=22's\?\= message of "Tue, 10 Nov 2015 12:21:39 +0100")
Marcin Kościelnicki <koriakin@0x04.net> writes:
> +/* TRACEPOINT_ASM expands to an assembly instruction large enough to fit
> + a fast tracepoint jump. The parameter is the label where we'll set
> + tracepoints and breakpoints. */
> +
> +#if (defined __x86_64__ || defined __i386__)
> +
> +static void
> +x86_trace_dummy ()
> +{
> + int x = 0;
> + int y = x + 4;
> +}
> +
> +#define TRACEPOINT_ASM(name) \
> + asm (" .global " SYMBOL(name) "\n" \
> + SYMBOL(name) ":\n" \
> + " call " SYMBOL(x86_trace_dummy) "\n" \
> + )
> +
> +#elif (defined __aarch64__)
> +
> +#define TRACEPOINT_ASM(name) \
> + asm (" .global " SYMBOL(name) "\n" \
> + SYMBOL(name) ":\n" \
> + " nop\n" \
> + )
> +
> +#else
TRACEPOINT_ASM isn't a good name to me. How about
FAST_TRACEPOINT_LABEL?
Otherwise the patch looks good to me.
--
Yao (齐尧)
next prev parent reply other threads:[~2015-11-11 8:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-10 11:21 [PATCH 1/2] gdb/testsuite/gdb.trace: Deduplicate pcreg/spreg/fpreg Marcin Kościelnicki
2015-11-10 11:21 ` [PATCH 2/2] gdb/testsuite/gdb.trace: Deduplicate set_point assembly Marcin Kościelnicki
2015-11-11 8:42 ` Yao Qi [this message]
2015-11-11 12:42 ` Marcin Kościelnicki
2015-11-10 11:35 ` [PATCH v2 1/2] gdb/testsuite/gdb.trace: Deduplicate pcreg/spreg/fpreg Marcin Kościelnicki
2015-11-10 17:55 ` Yao Qi
2015-11-10 19:08 ` Marcin Kościelnicki
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=86pozhvseg.fsf@gmail.com \
--to=qiyaoltc@gmail.com \
--cc=gdb-patches@sourceware.org \
--cc=koriakin@0x04.net \
/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).