From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37452 invoked by alias); 31 Jan 2018 11:55:56 -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 37433 invoked by uid 89); 31 Jan 2018 11:55:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=32500, H*r:sk:static. X-HELO: mail-wr0-f177.google.com Received: from mail-wr0-f177.google.com (HELO mail-wr0-f177.google.com) (209.85.128.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 31 Jan 2018 11:55:53 +0000 Received: by mail-wr0-f177.google.com with SMTP id 36so14653925wrh.1 for ; Wed, 31 Jan 2018 03:55:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=UdKZXFIlpRwmqNUJJoCCkLV9Wm3qr0zRdWWFzPpxz70=; b=ExOeh2arTAF9otkLVpUDMdoZMyVkrl+kNrUlhCHdMhhwLtCW6byXK8tt+5s7RKUqM4 Kmb4ErHi9yBPDQssOoB0PCeMm91MjypDmdst1UfeXtVZ1p/l+7R6fBkYF04C730RVHK6 dU525wcBXqLgvj+GdonR0JYD9+2Gohvu3PNkr3lwMdBea8elDlVTsUaiezafRMCwo3aV sDzDwWfAN7UAPygvvvKiCB87tVaDBji4UufFauqP6DJ1v54uJ6W/sEqVaTaQfAltaH62 CbhWS2KPjQeEl+TnFZ+1Q9sn9JLMntDBy3jw9nw+kFlT/WrVS614RFKFRSqUbPHnTyYC EGXw== X-Gm-Message-State: AKwxytflUUGuzKLcS3s5DdpNYAMNSRe0Ryiu4pK3fDndfZlHD+AUuDof /vEHaCzcxpBAI+v4aDhxAyPoPA== X-Google-Smtp-Source: AH8x224oR7WhotNHEEcyujunv5YP0+n52YyyJWd0m3/GhUfxmRuMB2lXYGUCjnbp/TXVWpK6R8Jywg== X-Received: by 10.223.158.5 with SMTP id u5mr26701698wre.197.1517399751075; Wed, 31 Jan 2018 03:55:51 -0800 (PST) Received: from E107787-LIN (static.42.136.251.148.clients.your-server.de. [148.251.136.42]) by smtp.gmail.com with ESMTPSA id t14sm13165892wmc.23.2018.01.31.03.55.49 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Wed, 31 Jan 2018 03:55:50 -0800 (PST) From: Yao Qi To: Simon Marchi Cc: Pedro Alves , gdb-patches@sourceware.org Subject: Re: [PATCH 4/7] Class-fy partial_die_info References: <1516873114-7449-1-git-send-email-yao.qi@linaro.org> <1516873114-7449-5-git-send-email-yao.qi@linaro.org> <3655ae02-6fe5-de74-1e4d-f396b200f226@redhat.com> <8f245668d980ad825fd6499c24730f67@simark.ca> Date: Wed, 31 Jan 2018 11:55:00 -0000 In-Reply-To: <8f245668d980ad825fd6499c24730f67@simark.ca> (Simon Marchi's message of "Tue, 30 Jan 2018 22:46:30 -0500") Message-ID: <86a7wucke5.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00651.txt.bz2 Simon Marchi writes: > Ah, indeed. I thought that unordered_map would be implemented the > same way as htab_t, but I see it's not the case. Doing some quick > tests on a big binary, it increases the time reading the symbols from > an average of 37 seconds to an average of 42 seconds. > > I understand the different hash table implementation having an impact, > but I don't really understand how the allocation scheme can have a > meaningful impact. The partial_die_info objects are still allocated > on the obstack, aren't they? So it's just the space for the table > itself that isn't on the objstack, but I don't see why that would make > a difference. Hi Simon, We have some perf test cases, in gdb.perf, but they may not cover the path we are discussing here. If you want to run them, do these things, $ cd gdb/testsuite $ make -j10 build-perf RUNTESTFLAGS=3D"MONSTER=3Dy gmonster1.exp" // this takes a while to generate many executable files, $ make check-perf RUNTESTFLAGS=3D"MONSTER=3Dy gmonster1-null-lookup.exp gm= onster1-print-cerr.exp gmonster1-runto-main.exp gmonster1-pervasive-typedef= .exp gmonster1-ptype-string.exp gmonster1-select-file.exp" GDB_PERFTEST_MO= DE=3Drun // it takes one hour on my aarch64-linux box You can get the performance number in perftest.sum. I run these perf tests, with and without Simon's patch (htab_t -> std::unordered_map), on aarch64-linux, I don't see speed and space change. Again, these existing test cases may not cover the path. gmonster1:gmonster-null-lookup cpu_time 10-cus 0.0008508 0.0013708 gmonster1:gmonster-null-lookup cpu_time 100-cus 0.0047922 0.0030584 gmonster1:gmonster-null-lookup cpu_time 1000-cus 0.0400274 0.0397188 gmonster1:gmonster-null-lookup cpu_time 10000-cus 0.3885292 0.3862456 gmonster1:gmonster-null-lookup wall_time 10-cus 0.000862598419189 0.0013798= 7136841 gmonster1:gmonster-null-lookup wall_time 100-cus 0.00480117797852 0.0030653= 9535522 gmonster1:gmonster-null-lookup wall_time 1000-cus 0.0400432109833 0.0397333= 621979 gmonster1:gmonster-null-lookup wall_time 10000-cus 0.388552331924 0.3862821= 10214 gmonster1:gmonster-null-lookup vmsize 10-cus 35900 35896 gmonster1:gmonster-null-lookup vmsize 100-cus 64992 64972 gmonster1:gmonster-null-lookup vmsize 1000-cus 364748 364760 gmonster1:gmonster-null-lookup vmsize 10000-cus 3313284 3313360 gmonster1:gmonster-pervasive-typedef cpu_time 10-cus 0.0682848 0.0737696 gmonster1:gmonster-pervasive-typedef cpu_time 100-cus 0.5843324 0.6391266 gmonster1:gmonster-pervasive-typedef cpu_time 1000-cus 6.061932 6.621443 gmonster1:gmonster-pervasive-typedef cpu_time 10000-cus 62.6619226 67.15144= 86 gmonster1:gmonster-pervasive-typedef wall_time 10-cus 0.0683585643768 0.073= 7894058228 gmonster1:gmonster-pervasive-typedef wall_time 100-cus 0.585014867783 0.641= 395568848 gmonster1:gmonster-pervasive-typedef wall_time 1000-cus 6.07634234428 6.622= 92981148 gmonster1:gmonster-pervasive-typedef wall_time 10000-cus 62.6738821507 67.2= 341232777 gmonster1:gmonster-pervasive-typedef vmsize 10-cus 32381 32368 gmonster1:gmonster-pervasive-typedef vmsize 100-cus 41131 41084 gmonster1:gmonster-pervasive-typedef vmsize 1000-cus 129726 129553 gmonster1:gmonster-pervasive-typedef vmsize 10000-cus 1007898 1007878 gmonster1:gmonster-print-cerr cpu_time 10-cus 0.0011148 0.0011168 gmonster1:gmonster-print-cerr cpu_time 100-cus 0.0056498 0.0056002 gmonster1:gmonster-print-cerr cpu_time 1000-cus 0.0502508 0.0948982 gmonster1:gmonster-print-cerr cpu_time 10000-cus 0.4922956 0.4948586 gmonster1:gmonster-print-cerr wall_time 10-cus 0.00112357139587 0.001123809= 81445 gmonster1:gmonster-print-cerr wall_time 100-cus 0.00565934181213 0.00561075= 210571 gmonster1:gmonster-print-cerr wall_time 1000-cus 0.0502710342407 0.09495062= 82806 gmonster1:gmonster-print-cerr wall_time 10000-cus 0.492320823669 0.49492840= 7669 gmonster1:gmonster-print-cerr vmsize 10-cus 32508 32500 gmonster1:gmonster-print-cerr vmsize 100-cus 41308 41300 gmonster1:gmonster-print-cerr vmsize 1000-cus 128944 128948 gmonster1:gmonster-print-cerr vmsize 10000-cus 993324 993316 gmonster1:gmonster-runto-main cpu_time 10-cus 0.0360472 0.0231514 gmonster1:gmonster-runto-main cpu_time 100-cus 0.5829484 0.5236148 gmonster1:gmonster-runto-main cpu_time 1000-cus 9.146062 7.9914552 gmonster1:gmonster-runto-main cpu_time 10000-cus 134.266728 134.1361918 gmonster1:gmonster-runto-main wall_time 10-cus 0.042032957077 0.03133416175= 84 gmonster1:gmonster-runto-main wall_time 100-cus 0.588344860077 0.5302999496= 46 gmonster1:gmonster-runto-main wall_time 1000-cus 9.15567464828 7.99887242317 gmonster1:gmonster-runto-main wall_time 10000-cus 134.285585785 134.15385747 gmonster1:gmonster-runto-main vmsize 10-cus 32503 32496 gmonster1:gmonster-runto-main vmsize 100-cus 41308 41296 gmonster1:gmonster-runto-main vmsize 1000-cus 128960 128952 gmonster1:gmonster-runto-main vmsize 10000-cus 993336 993296 gmonster1:gmonster-select-file cpu_time 10-cus 0.0972798 0.1028992 gmonster1:gmonster-select-file cpu_time 100-cus 0.886951 0.9285964 gmonster1:gmonster-select-file cpu_time 1000-cus 9.166904 9.7175802 gmonster1:gmonster-select-file cpu_time 10000-cus 92.5872488 95.2634352 gmonster1:gmonster-select-file wall_time 10-cus 0.097380399704 0.1030022144= 32 gmonster1:gmonster-select-file wall_time 100-cus 0.887106800079 0.929784965= 515 gmonster1:gmonster-select-file wall_time 1000-cus 9.17858901024 9.720466756= 82 gmonster1:gmonster-select-file wall_time 10000-cus 92.6326120853 95.3189713= 955 gmonster1:gmonster-select-file vmsize 10-cus 32367 32384 gmonster1:gmonster-select-file vmsize 100-cus 41064 41056 gmonster1:gmonster-select-file vmsize 1000-cus 128694 128703 gmonster1:gmonster-select-file vmsize 10000-cus 993052 993048 --=20 Yao (=E9=BD=90=E5=B0=A7)