[PATCH] D128439: [Clang][WIP] Don't call distributeTypeAttrsFromDeclarator() on empty list.

Nikita Popov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 24 01:41:44 PDT 2022

nikic added a comment.

In D128439#3607289 <https://reviews.llvm.org/D128439#3607289>, @mboehme wrote:

> Just a question for my understanding before I abandon the change: Shouldn't the "instructions" count be relatively resistant to noise? (I was assuming this is based on performance counters? What would cause noise in this metric?)

There are two primary sources of noise. The first is kernel activity, as the `instructions` metric is a combined userspace and kernel metric. I do collect userspace-only as well (this is `instructions:u`). On that metric this does look like a small improvement just above the noise floor: http://llvm-compile-time-tracker.com/compare.php?from=8b6f69a4da5baaf3748798a84dd16a2481b7ca7f&to=797ba50f5fd88017925fe765427b1f5f136c3310&stat=instructions:u

The other is ASLR. If ASLR is disabled, the `instructions:u` measurements become perfectly noise-free. This is actually bad, because a lot of changes will then show statistically significant and perfectly reproducible compile-time changes that are ultimately just down to how exactly the address space gets laid out. So this is intentional noise :)

And yes, execution statistics are collected using `perf`. `callgrind` uses a CPU simulator instead, which is a much more controlled environment...

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list