Re: [PATCH 2/2] gdb/testsuite/gdb.trace: Deduplicate set_point assembly.

Yao Qi
2015-11-11T08:42:40Z

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 (齐尧)