linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Christopher Li <sparse@chrisli.org>
Cc: Linux-Sparse <linux-sparse@vger.kernel.org>,
	Dibyendu Majumdar <mobile@majumdar.org.uk>
Subject: Re: ptrlist-iterator performance on one wine source file
Date: Tue, 1 Aug 2017 22:33:58 +0200	[thread overview]
Message-ID: <20170801203357.4ywboptvr6tlytab@ltop.local> (raw)
In-Reply-To: <CAMHZB6Emib_U7AtDLZ5Wc6KGXtZzMwhbT-N+sk-B05PUVbtfNg@mail.gmail.com>

On Sun, Jul 30, 2017 at 06:16:03PM +0200, Luc Van Oostenryck wrote:
> On Sun, Jul 30, 2017 at 5:49 PM, Christopher Li <sparse@chrisli.org> wrote:
> 
> >>> >> In the memops finding dominating store is doing a lot worse. That is
> >>> >> why gcc complete that file almost instantly. Sparse takes 30 seconds
> >>> >> on my machine. One big problem is it did not cache the dominating
> >>> >> result. It is redoing the finding again and again.
> >>>
> >>> > Uh?
> >>> > Which input file your talking about?
> >>>
> >>> This ptrlist testing wine source file that takes  23 second for sparse to run.
> >>> I take a brief look at it, it is doing a lot of dominating search.
> >>
> >> Is it possible to have a pathname or a link?
> >
> > It is the very first email I send out:
> >
> >
> > git clone git://source.winehq.org/git/wine.git
> > cd win/dlls/usp10/tests
> >
> > The test command:
> >
> > time sparse -m64 -c -o usp10.o usp10.c -I. -I../../../include
> > -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing
> > -Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers
> > -Wshift-overflow=2 -Wstrict-prototypes -Wtype-limits
> > -Wunused-but-set-parameter -Wvla -Wwrite-strings -Wpointer-arith
> > -Wlogical-op -gdwarf-2 -gstrict-dwarf -g -O2
> 
> OK, thanks. I'll take a look once the infinite loop problem will be closed.
> 
> > I think gcc compile this file very fast but sparse spend a lot of time on it.
> 
> Interesting.
> On most input sparse is much faster than gcc, often by a factor or 10
> or even more. But of course, if there is a problem with sparse ...
> 
> > My impression it is spending time repeat finding dominating stores.
> Possible indeed.

When I try the command you gave with -rc4 sparse I get:
	real	0m3.281s
	user	0m3.175s
	sys	0m0.097s
wich is very far from the 23-30s you got. Dunno what the difference could be.

For comparison, with the new 7 patches the time is now:
	real	0m2.146s
	user	0m1.928s
	sys	0m0.214s
wich is significatively faster.

And with gcc I get:
	real	0m2.153s
	user	0m2.080s
	sys	0m0.078s

Also, the result of the preprocessing is a 13K lines, 788K bytes file.

I would still expect that sparse is (much) faster than gcc, but
with the number I have here, I'm not sure I can say something is wrong.
But we should first find why you got 23-30s while I got 3.3.

-- Luc

  reply	other threads:[~2017-08-01 20:34 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 [this message]
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
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=20170801203357.4ywboptvr6tlytab@ltop.local \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=mobile@majumdar.org.uk \
    --cc=sparse@chrisli.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).