From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126355 invoked by alias); 14 Sep 2015 09:06:08 -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 125577 invoked by uid 89); 14 Sep 2015 09:06:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.1 required=5.0 tests=AWL,BAYES_00,MIME_BASE64_BLANKS,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 X-HELO: na01-bl2-obe.outbound.protection.outlook.com Received: from mail-bl2on0126.outbound.protection.outlook.com (HELO na01-bl2-obe.outbound.protection.outlook.com) (65.55.169.126) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA256 encrypted) ESMTPS; Mon, 14 Sep 2015 09:06:06 +0000 Received: from BY2PR0301MB1525.namprd03.prod.outlook.com (10.163.27.151) by BY2PR0301MB0712.namprd03.prod.outlook.com (10.160.63.154) with Microsoft SMTP Server (TLS) id 15.1.262.15; Mon, 14 Sep 2015 09:06:03 +0000 Received: from BY2PR0301MB1527.namprd03.prod.outlook.com (10.163.27.153) by BY2PR0301MB1525.namprd03.prod.outlook.com (10.163.27.151) with Microsoft SMTP Server (TLS) id 15.1.268.17; Mon, 14 Sep 2015 09:06:01 +0000 Received: from BY2PR0301MB1527.namprd03.prod.outlook.com ([10.163.27.153]) by BY2PR0301MB1527.namprd03.prod.outlook.com ([10.163.27.153]) with mapi id 15.01.0268.017; Mon, 14 Sep 2015 09:06:01 +0000 From: Nistor Mihail To: Yao Qi CC: "gdb-patches@sourceware.org" Subject: RE: [PATCH] gdb/18947: [aarch64]Step into shared library is very slow. Date: Mon, 14 Sep 2015 09:06:00 -0000 Message-ID: References: <1441876920-32009-1-git-send-email-mihail.nistor@freescale.com> <86613i7b1b.fsf@gmail.com> <861te674zl.fsf@gmail.com> <86si6l58wu.fsf@gmail.com> In-Reply-To: <86si6l58wu.fsf@gmail.com> authentication-results: spf=none (sender IP is ) smtp.mailfrom=mihail.nistor@freescale.com; x-microsoft-exchange-diagnostics: 1;BY2PR0301MB1525;5:06X7XAwGv1o12O6R40up/C3VYZkFeESgmD2YtLIUFyJztVLlCEsBK916pFqql8vuC2XAkq6SA/R29UsxnUp4SzNkzYlOXxxKZuYTe4SHKOpKVhfJC857/gARciK6KjIhoXa+N2fUPFW2D4ED26Kj3A==;24:riz+1L+Uz+mPxmKAm62NJ70J1+Dirl9GSod522wnOiSV1cW2rCDGxdvjx7BREuW1PKhk2Rt3FiBjlTtNUgLG3yNhvC0wJqQJgVuSt2zJdhA=;20:ybWkLlv0mB6W44YopmmFrXWwPl7f9Pxc4upfGMzH2YxvOJ6NbWvyTaEwVUj13vyEwYA6aKbHLCZUzQGvx9UINg== x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB1525; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(601004)(5005006)(8121501046)(3002001);SRVR:BY2PR0301MB1525;BCL:0;PCL:0;RULEID:;SRVR:BY2PR0301MB1525; x-forefront-prvs: 0699FCD394 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(979002)(6009001)(377454003)(13464003)(189002)(45984002)(199003)(5001830100001)(110136002)(5001860100001)(10400500002)(5001960100002)(76576001)(46102003)(92566002)(189998001)(11100500001)(2900100001)(2950100001)(5002640100001)(5001920100001)(40100003)(105586002)(68736005)(5007970100001)(93886004)(122556002)(5004730100002)(5003600100002)(77096005)(81156007)(106116001)(97736004)(62966003)(102836002)(106356001)(4001540100001)(87936001)(19580405001)(19580395003)(77156002)(76176999)(99286002)(50986999)(54356999)(101416001)(74316001)(1411001)(86362001)(64706001)(66066001)(33656002)(969003)(989001)(999001)(1009001)(1019001);DIR:OUT;SFP:1102;SCL:1;SRVR:BY2PR0301MB1525;H:BY2PR0301MB1527.namprd03.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: freescale.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-originalarrivaltime: 14 Sep 2015 09:06:01.1239 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 710a03f5-10f6-4d38-9ff4-a80b81da590d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR0301MB1525 X-Microsoft-Exchange-Diagnostics: 1;BY2PR0301MB0712;2:PR9fpDnI7ReVlvZFkd4Lf3KL9H0rPvaKdjBf8sLwrOsImIyhXwAgyilF7JtIPkRCiWAHLcxYdFBpHxbaBX+iIaUoNYayanWSuoILTf7/zjrhK+m818ZK6TXObRcG0ZxCcHOK/HD4B+47w0552m0PtriB5BPwF6s5kNJLJoBFYcw=;23:UToNDBOIxd1j1ikJ3SmKQsQfDcgR6vKwmCqybCxy/+lhSCaaVUYm0898NKsQ5XyWB9u3mQeyuz3CUUAaSOl8JDBeI9tvz8i4mRSrWhSZB7nYNxGQDGAxphOcuT6t/s2FIiNBcZUBZnxqrb8K8IEzGWWd8eXvJpfh3LBr7kmcBGEis9Dd0BLxZfjJfBDqbDt6 X-OriginatorOrg: freescale.com X-SW-Source: 2015-09/txt/msg00269.txt.bz2 SGkgWWFvLA0KDQpUaGFuayB5b3UgdmVyeSBtdWNoIGZvciB5b3VyIHN1cHBv cnQuDQoNCkJlc3QgcmVnYXJkcywNCk1paGFpDQoNCi0tLS0tT3JpZ2luYWwg TWVzc2FnZS0tLS0tDQpGcm9tOiBZYW8gUWkgW21haWx0bzpxaXlhb2x0Y0Bn bWFpbC5jb21dIA0KU2VudDogRnJpZGF5LCBTZXB0ZW1iZXIgMTEsIDIwMTUg NToyNyBQTQ0KVG86IE5pc3RvciBNaWhhaWwtTU5JU1RPUjEgPG1paGFpbC5u aXN0b3JAZnJlZXNjYWxlLmNvbT4NCkNjOiBZYW8gUWkgPHFpeWFvbHRjQGdt YWlsLmNvbT47IGdkYi1wYXRjaGVzQHNvdXJjZXdhcmUub3JnDQpTdWJqZWN0 OiBSZTogW1BBVENIXSBnZGIvMTg5NDc6IFthYXJjaDY0XVN0ZXAgaW50byBz aGFyZWQgbGlicmFyeSBpcyB2ZXJ5IHNsb3cuDQoNCk5pc3RvciBNaWhhaWwg PG1paGFpbC5uaXN0b3JAZnJlZXNjYWxlLmNvbT4gd3JpdGVzOg0KDQo+IEkg ZG9uJ3QgaGF2ZSB0aGUgd3JpdGUgYWNjZXNzIG9uIGdpdC4gQ291bGQgeW91 IHBsZWFzZSBwdXQgdGhpcyBwYXRjaCBvbiBnaXQuDQoNClN1cmUsIHBhdGNo IGlzIHB1c2hlZCBpbnRvIG1haW5saW5lLiAgSSBwbGFuIHRvIHB1c2ggaXQg aW4gdG8gNy4xMCBicmFuY2ggdG9vLiAgTWloYWlsLU1hcmlhbiwgdGhhbmtz IGZvciB5b3VyIGNvbnRyaWJ1dGlvbiENCg0KRm9yIHRoZSByZWNvcmQsIEkg Y2hlY2tlZCB0aGF0IGZyZWVzY2FsZSBoYXMgdGhlIGNvcHlyaWdodCBhc3Np Z25tZW50LCBzbyB3ZSBjYW4gcHVzaCBpdCBpbi4NCg0KLS0NCllhbyAo6b2Q 5bCnKQ0K >From gdb-patches-return-126030-listarch-gdb-patches=sources.redhat.com@sourceware.org Mon Sep 14 09:24:59 2015 Return-Path: Delivered-To: listarch-gdb-patches@sources.redhat.com Received: (qmail 48907 invoked by alias); 14 Sep 2015 09:24:59 -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 Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 48527 invoked by uid 89); 14 Sep 2015 09:24:57 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Mon, 14 Sep 2015 09:24:56 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 6AC7580091; Mon, 14 Sep 2015 09:24:55 +0000 (UTC) Received: from blade.nx (ovpn-116-114.ams2.redhat.com [10.36.116.114]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t8E9OsAh027125; Mon, 14 Sep 2015 05:24:55 -0400 Received: by blade.nx (Postfix, from userid 1000) id 1D4DD2642FF; Mon, 14 Sep 2015 10:24:54 +0100 (BST) Date: Mon, 14 Sep 2015 09:24:00 -0000 From: Gary Benson To: Antoine Tremblay Cc: gdb-patches@sourceware.org Subject: Re: [PATCH 2/7] Move some integer operations to common. Message-ID: <20150914092453.GA26894@blade.nx> References: <1441973603-15247-1-git-send-email-antoine.tremblay@ericsson.com> <1441973603-15247-3-git-send-email-antoine.tremblay@ericsson.com> <20150911142442.GA23515@blade.nx> <55F30C55.3080507@ericsson.com> <55F31019.1080607@ericsson.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <55F31019.1080607@ericsson.com> X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00270.txt.bz2 Content-length: 1288 Antoine Tremblay wrote: > On 09/11/2015 01:16 PM, Antoine Tremblay wrote: > > On 09/11/2015 10:24 AM, Gary Benson wrote: > > > Please don't introduce "#ifdef GDBSERVER" conditionals into > > > common code, I spent some time removing them. I know I didn't > > > get them all, but the remaining two are on my hit list. > > > > Humm what is the issue that makes this a bad idea if I may ? The way the common code is built is currently kind of weird and ugly. Even though the code is shared, there's still places you have to do the same work twice, for example if you add a new .c or .h file to common, for example, you have to add it to both GDB's and gdbserver's Makefiles. If you add stuff that needs configure checks, you have to add those twice too. Also we build gnulib twice. Also, the way the compiler is invoked means that you can accidentally #include GDB- or gdbserver-specific headers in common code. It's all very error-prone. For the future we'd like to move the common code into its own toplevel directory with it's own Makefile, it's own ./configure, etc. It would be built once, to a libgdbcommon.a or something that GDB and gdbserver would statically link. We can't do that if gdb/{common,nat,target} have conditional code. Thanks, Gary -- http://gbenson.net/