Re: ptrlist-iterator performance on one wine source file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 2, 2017 at 3:17 AM, Christopher Li <sparse@xxxxxxxxxxx> wrote:
> On Tue, Aug 1, 2017 at 5:46 PM, Luc Van Oostenryck
> <luc.vanoostenryck@xxxxxxxxx> wrote:
>> has any effects for sparse and the only effect of -O2 is
>> to define __OPTIMIZE__.
>
> Yes, indeed. It is the -O2 make the difference.
>
> I recently upgrade to Fedora 26. I think it is the system header file
> making a difference
> on the __OPTIMIZE__. I attach two files here. O2.c is the one with -O2 flag
> after processor. The 0.c is the one without.
>
> There is huge difference in them.
>
> I confirm with O2.c I am seeing the 24 second delay. And 0.c 4 seconds.
>
> I attach the two files with gzip.

It seems that the email was rejected on the mailing list.

> I think you should be able to reproduce it with O2.c now.

Yes, I can reproduce it now.
The differences in the two file are not big. Basically, in -O2 there is
- a bunch of small functions which have now an inline definition
- a set of strcmp(winetest_platform, "wine") which are replaced
  by a macro of hell.
It's, of course, the last one which creates the problem.
The macro seems to try to optimize the compare using the fact
that the compiler will statically evaluate things like:
- strlen("wine")
- "wine"[0], "wine"[1], ...
but sparse doesn't do this kind of simplification (yet) and this result
in much much more code.

A first inspection of the generated code doesn't show anything
obviously wrong but I don't exclude there is another problem.

-- Luc
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux