From patchwork Mon Jun 1 14:21:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vidya Praveen X-Patchwork-Id: 479052 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 2D933140FD9 for ; Tue, 2 Jun 2015 00:22:14 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=gwzoL1F4; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; q=dns; s= default; b=H9Mx3FWPY08UBrI4dYWTjifUS557hs9Xsv4jZgkV+ZjkqU99i0fr4 Cwa08pi9HezQwahLXpKvSpZ80HmqNP7bQr00WYW0xLe3XJ5mPR2PnfS0kxdLN8wU jVcJHRf0r8kVluU+G8wmkk60gziMfPX3++/4VjXeqeZ+nwNekD5Hbs= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type:content-transfer-encoding; s=default; bh=QF0rgIPdPfnRRUaa5NFem/XtWaI=; b=gwzoL1F49gxiDJ7K/6oSbHGylAPZ cBzTpViyyUKARmwG6qc0DYs7R/JKdbqKgUNssZnrHeJ+UEntpdwJpxMns81pEMNc ROG58ZnyGqmbiIB9NtkBIlfKJuq9HcPX1N2Qmj9gt69+FHPR963vzmK5MJiL4aHs jYTnuNzzh1uuCv0= Received: (qmail 71237 invoked by alias); 1 Jun 2015 14:22:02 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 71220 invoked by uid 89); 1 Jun 2015 14:22:01 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, SPF_PASS autolearn=ham version=3.3.2 X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (146.101.78.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 01 Jun 2015 14:22:00 +0000 Received: from cam-owa1.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.140]) by uk-mta-21.uk.mimecast.lan; Mon, 01 Jun 2015 15:21:57 +0100 Received: from [10.2.207.44] ([10.1.2.79]) by cam-owa1.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 1 Jun 2015 15:21:57 +0100 Message-ID: <556C6A78.20507@arm.com> Date: Mon, 01 Jun 2015 15:21:44 +0100 From: Vidya Praveen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: =?UTF-8?B?TWFydGluIExpxaFrYQ==?= , Richard Biener CC: GCC Patches Subject: Re: [PATCH, RFC] New memory usage statistics infrastructure References: <555604F0.40802@suse.cz> <55688F1E.4070704@arm.com> <556C444B.4040907@suse.cz> <556C6745.4010003@suse.cz> In-Reply-To: <556C6745.4010003@suse.cz> X-MC-Unique: cEJAOxU8Q3aO2TWZW7ZTKQ-1 X-IsSubscribed: yes On 01/06/15 15:08, Martin Liška wrote: > On 06/01/2015 02:18 PM, Richard Biener wrote: >> On Mon, Jun 1, 2015 at 1:38 PM, Martin Liška wrote: >>> On 05/29/2015 06:09 PM, Vidya Praveen wrote: >>>> >>>> Martin, >>>> >>>> The following change: >>>> >>>> @@ -2655,10 +2655,10 @@ s-iov: build/gcov-iov$(build_exeext) $(BASEVER) $(DEVPHASE) >>>> >>>> GCOV_OBJS = gcov.o >>>> gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS) >>>> - +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_OBJS) $(LIBS) -o $@ >>>> + +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_OBJS) build/hash-table.o ggc-none.o $(LIBS) -o $@ >>>> >>>> >>>> seem to cause canadian cross build failure for arm and aarch64 on x86_64 as >>>> build/hash-table.o and ggc-none.o are not built by the same compiler? >>>> >>>> arm-none-linux-gnueabi-g++ -no-pie -g -O2 -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing >>>> +-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wn >>>> build/hash-table.o ggc-none.o libcommon.a ../libcpp/libcpp.a ../libbacktrace/.libs/libbacktrace.a ../libiberty/libiberty.a .. >>>> +/libdecnumber/libdecnumber.a -o gcov >>>> build/hash-table.o: file not recognized: File format not recognized >>>> collect2: error: ld returned 1 exit status >>>> make[1]: *** [gcov] Error 1 >>>> >>>> >>>> Should it be: >>>> >>>> - +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_OBJS) $(LIBS) -o $@ >>>> + +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_OBJS) hash-table.o ggc-none.o $(LIBS) -o $@ >>>> >>>> instead? >>> >>> Hello Vidya. >>> >>> Thanks for pointing out. To be honest, I'm not a build system guru and it's hard for me to verify >>> that the change you suggest is the correct. >>> >>> May I please ask you for sending a patch to mailing? >> >> gcov isn't a build but a host tool so the patch looks good to me. >> >> Richard. >> >>> Thanks, >>> Martin >>> >>>> >>>> VP. >>>> >>>> >>>> On 15/05/15 15:38, Martin Liška wrote: >>>>> Hello. >>>>> >>>>> Following patch attempts to rewrite memory reports for GCC's internal allocations >>>>> so that it uses a new template type. The type shares parts which are currently duplicated, >>>>> adds support for special 'counters' and introduces new support for hash-{set,map,table}. >>>>> >>>>> Transformation of the current code is a bit tricky as we internally used hash-table as main >>>>> data structure which takes care of location-related allocations. As I want to add support even >>>>> for hash tables (and all derived types), header files inclusion and forward declaration is utilized. >>>>> >>>>> Feel free to comment the patch, as well as missing features one may want to track by location sensitive >>>>> memory allocation. >>>>> >>>>> Attachment contains sample output taken from tramp3d-v4.cpp. >>>>> >>>>> Thanks, >>>>> Martin >>>>> >>>> >>> > > Ok. > > I'm going to install following patch. Martin, I realized we require change in one more place. I'm just doing builds to verify this. VP. diff --git a/gcc/Makefile.in b/gcc/Makefile.in index b59b5d9..3d14938 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -2667,11 +2667,11 @@ s-iov: build/gcov-iov$(build_exeext) $(BASEVER) $(DEVPHASE) GCOV_OBJS = gcov.o gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS) +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_OBJS) \ - build/hash-table.o ggc-none.o $(LIBS) -o $@ + hash-table.o ggc-none.o $(LIBS) -o $@ GCOV_DUMP_OBJS = gcov-dump.o gcov-dump$(exeext): $(GCOV_DUMP_OBJS) $(LIBDEPS) +$(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) $(GCOV_DUMP_OBJS) \ - build/hash-table.o build/ggc-none.o\ + hash-table.o ggc-none.o\ $(LIBS) -o $@ GCOV_TOOL_DEP_FILES = $(srcdir)/../libgcc/libgcov-util.c gcov-io.c $(GCOV_IO_H) \