From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98716 invoked by alias); 11 Nov 2015 12:42:42 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 98663 invoked by uid 89); 11 Nov 2015 12:42:41 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: xyzzy.0x04.net Received: from xyzzy.0x04.net (HELO xyzzy.0x04.net) (109.74.193.254) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 11 Nov 2015 12:42:38 +0000 Received: from hogfather.0x04.net (89-65-84-110.dynamic.chello.pl [89.65.84.110]) by xyzzy.0x04.net (Postfix) with ESMTPS id 205203FF2D; Wed, 11 Nov 2015 13:42:57 +0100 (CET) Received: from [192.168.13.108] (89-65-84-110.dynamic.chello.pl [89.65.84.110]) by hogfather.0x04.net (Postfix) with ESMTPSA id 58037580092; Wed, 11 Nov 2015 13:42:21 +0100 (CET) Subject: Re: [PATCH 2/2] gdb/testsuite/gdb.trace: Deduplicate set_point assembly. To: Yao Qi References: <1447154499-22247-1-git-send-email-koriakin@0x04.net> <1447154499-22247-2-git-send-email-koriakin@0x04.net> <86pozhvseg.fsf@gmail.com> Cc: gdb-patches@sourceware.org From: =?UTF-8?Q?Marcin_Ko=c5=9bcielnicki?= Message-ID: <564337A6.6090808@0x04.net> Date: Wed, 11 Nov 2015 12:42:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <86pozhvseg.fsf@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00271.txt.bz2 On 11/11/15 09:42, Yao Qi wrote: > Marcin Kościelnicki 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!