When Your Profiler Lies
randomascii.wordpress.com
randomascii.wordpress.com
[0]https://docs.microsoft.com/en-gb/windows/desktop/SysInfo/acq...
1) The 2.53 MHz QPC is just the rdtsc frequency divided by 1,024 2) The slowdown is from calling ReadTimeStampCounterFromEmulator, which it seems to discard the results of
My laptop doesn't run at 10.24 GHz so it probably is using HPET rather than rdtsc/1024. This makes QPC more expensive but I don't think it is messing up the reported timings - events are just outright being lost, as far as I can tell
The reduced precision isn't what really bothers me though - it's the cost. My measurements suggest that QPC is about 25x as expensive as rdtsc on this laptop - expensive enough to make calling it too frequently a problem.
This article explains some of the reasons why rdtsc might not be used to implement QPC, and I'm curious as to which one applies, and how machines this applies to:
https://docs.microsoft.com/en-us/windows/desktop/SysInfo/acq...
Sure there are some times where having source access to other projects helps, but in most cases it really doesn’t.
Essentially at best it turns “this function takes more time than I would expect” into the same thing with “... I think because of X”.
You may think “I could fix it” but again in most cases any fix will require you knowing why certain trade offs were made. Designing around internal design also means you may end up having overly complex code that continues to exist if the library changes design to improve that case. It may even become slower, or worse if your software is important enough may prevent future improvements that would benefit everyone.
So no, being open source does not magically make all bugs trivially fixable.
Nobody claimed this.
EDIT: What is being claimed is that buggy code being open source helps the debugging experience, which is a weaker claim than what you tried to argue against.
Then again, that would require kernel debugging and a second machine and there would be numerous logistical problems, so I might not have bothered.
I spent too much time trying to reconcile the discrepancy and I ultimately failed - maybe source code would have helped.
Open sourcing (or at least public sourcing) the windows userland would make development on the platform a lot easier.