From: Christopher Li <sparse@chrisli.org>
To: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
Linux-Sparse <linux-sparse@vger.kernel.org>,
Dibyendu Majumdar <mobile@majumdar.org.uk>
Subject: Re: ptrlist-iterator performance on one wine source file
Date: Fri, 4 Aug 2017 20:23:11 -0400 [thread overview]
Message-ID: <CANeU7QkBoEEec=Tj5HyeWPxSqKP9ioGuveODDv8eh+xmbOGHPw@mail.gmail.com> (raw)
In-Reply-To: <CAExDi1SXUkfR1eNZWLy9cOdEsZSbEb_0rSsEbk6dO8CZkfRxQA@mail.gmail.com>
On Fri, Aug 4, 2017 at 6:26 PM, Luc Van Oostenryck
<luc.vanoostenryck@gmail.com> wrote:
>
> I have investigated a little more because even 2.1 or 1.93s seems
> too much to me.
Thanks for looking into this.
>
> My conclusion is that the file is (really too) big (but see the end).
> For example, there is:
> - about 1 million calls to clean_up_one_instruction
> - and 2.6 million calls to insn_compare()
> OTOH there is only 56000 calls to try_to_cse()
> and these results in 82000 calls to bb_dominates()
> and 29000 calls to cse_one_instruction().
>
> All this indicate that the CSE is rather efficient:
> only 56000 real CSE checks, each calling roughly 3/2
> calls to bb_dominates() and 1/2 calls to cse_one_insn().
>
> And in fact, most of these calls are not even really expensive.
>
> The real offending, taking about 75% of CPU time, is bb_dominates()
> which while only directly called 82000 is a recursive function which
> internally is called more than 71 million of time!
> In other words, the mean recursion depth of bb_dominates() is 860,
> which means that there are chains of bb->parent as long as 860.
Yes, that is the impression I get as well for, some where the finding
dominates is taking a lot of time. Also the result is not saved.
>
> By restricting the bb_dominates() in CSE to a reasonable depth of 32,
> the compile time is reduced to .8s without changing a single bit in the
> resulting code.
We can revisit this after the release. I have side project work on finding
the dominatior tree.
Chris
next prev parent reply other threads:[~2017-08-05 0:23 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-27 15:05 ptrlist-iterator performance on one wine source file Christopher Li
2017-07-29 13:01 ` Luc Van Oostenryck
2017-07-29 15:53 ` Christopher Li
2017-07-29 16:04 ` Luc Van Oostenryck
2017-07-29 16:25 ` Christopher Li
2017-07-29 16:30 ` Christopher Li
2017-07-29 16:35 ` Luc Van Oostenryck
2017-07-29 19:33 ` Christopher Li
2017-07-29 21:47 ` Luc Van Oostenryck
2017-07-30 4:15 ` Christopher Li
2017-07-30 15:12 ` Luc Van Oostenryck
2017-07-30 15:49 ` Christopher Li
2017-07-30 16:16 ` Luc Van Oostenryck
2017-08-01 20:33 ` Luc Van Oostenryck
2017-08-01 21:09 ` Christopher Li
2017-08-01 21:46 ` Luc Van Oostenryck
2017-08-01 23:37 ` Christopher Li
2017-08-02 0:42 ` Christopher Li
[not found] ` <CANeU7QmzundH7qpdYhQqDJgBv+5pPemwft+1uH5oVQ1POnoQDw@mail.gmail.com>
2017-08-02 22:50 ` Luc Van Oostenryck
2017-08-03 21:49 ` Luc Van Oostenryck
2017-08-03 22:29 ` Luc Van Oostenryck
2017-08-03 22:35 ` Linus Torvalds
2017-08-04 0:04 ` Christopher Li
2017-08-04 0:11 ` Luc Van Oostenryck
2017-08-04 0:16 ` [PATCH] fix: give a type to bad conditionnal expressions Luc Van Oostenryck
2017-08-04 12:31 ` Luc Van Oostenryck
2017-08-04 14:52 ` Christopher Li
2017-08-04 14:53 ` Christopher Li
2017-08-04 11:33 ` ptrlist-iterator performance on one wine source file Luc Van Oostenryck
2017-08-04 14:51 ` Christopher Li
2017-08-04 22:26 ` Luc Van Oostenryck
2017-08-05 0:23 ` Christopher Li [this message]
2017-08-05 10:05 ` Luc Van Oostenryck
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CANeU7QkBoEEec=Tj5HyeWPxSqKP9ioGuveODDv8eh+xmbOGHPw@mail.gmail.com' \
--to=sparse@chrisli.org \
--cc=linux-sparse@vger.kernel.org \
--cc=luc.vanoostenryck@gmail.com \
--cc=mobile@majumdar.org.uk \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).