public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: "Marcin Kościelnicki" <koriakin@0x04.net>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 2/2] gdb/testsuite/gdb.trace: Deduplicate set_point assembly.
Date: Wed, 11 Nov 2015 12:42:00 -0000	[thread overview]
Message-ID: <564337A6.6090808@0x04.net> (raw)
In-Reply-To: <86pozhvseg.fsf@gmail.com>

On 11/11/15 09:42, Yao Qi wrote:
> 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.
>

Yeah, that sounds better, will push with FAST_TRACEPOINT_LABEL.

Thanks!

  reply	other threads:[~2015-11-11 12: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
2015-11-11 12:42     ` Marcin Kościelnicki [this message]
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=564337A6.6090808@0x04.net \
    --to=koriakin@0x04.net \
    --cc=gdb-patches@sourceware.org \
    --cc=qiyaoltc@gmail.com \
    /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).