qemu-devel
[Top][All Lists]
Advanced

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

RE: Known issue? qemu is much slower when built with clang vs gcc


From: Brian Cain
Subject: RE: Known issue? qemu is much slower when built with clang vs gcc
Date: Tue, 25 Aug 2020 03:49:53 +0000

Taylor,

 

I can report that the performance looks to be in the ballpark of parity with gcc when we move from clang 8.0 to 11.0 rc2.   Perhaps we can attribute this to a since-fixed defect in clang?

 

-Brian

 

From: Taylor Simpson <tsimpson@quicinc.com>
Sent: Monday, August 24, 2020 11:54 AM
To: qemu-devel@nongnu.org
Cc: Brian Cain <bcain@quicinc.com>
Subject: Known issue? qemu is much slower when built with clang vs gcc

 

We’re seeing significant slowdowns when we build qemu with clang instead of gcc.  I’m hoping this is a known issue and there is a workaround or fix.  Please advise.

 

I have an example where qemu is 29X slower when built with clang.  My first hunch was that there was something different happening in configure (e.g., passing -O0 to clang instead of -O2).  However, I have ruled this out.

 

Further investigation shows that we are calling the translator more often.  The same code is getting translated multiple times.  So, my current theory is some different behavior in the translation block hashing causing the lookup not to find existing translations.  I know clang can be overly aggressive about optimizing undefined behavior.  So, I turned on clang’s undefined behavior sanitizer.  Interestingly, it did not report anything, *and* we don’t see the large performance difference.

 

Thanks,

Taylor

 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]