Breaking changes in Visual C++ 2015
H. S. Teoh via Digitalmars-d
digitalmars-d at puremagic.com
Sat May 9 22:39:01 PDT 2015
On Fri, May 08, 2015 at 10:36:28PM -0700, Walter Bright via Digitalmars-d wrote:
> On 5/8/2015 10:09 PM, H. S. Teoh via Digitalmars-d wrote:
> >The built-in dmd profiler is unfortunately unusable for me because
> >its function call counters wrap around far too early (IIRC they use
> >16-bit counters or something like that),
>
> 32 bit counters
>
> https://github.com/D-Programming-Language/druntime/blob/master/src/rt/trace.d#L38
>
> >whereas the test cases I need to
> >optimize for are the long-running, steady state test cases in which
> >millions or billions of function calls are made.
> >
> >Will this ever be improved?
>
> if (bugzilla report submitted || developers are mind readers)
> {
> maybe it'll get fixed!
> }
> else
> {
> nobody knows there's a problem
> }
>
> Feel free to submit a PR to make 'count' a ulong.
https://issues.dlang.org/show_bug.cgi?id=14565
I also just realized that on Posix the profiling code apparently relies
on the rdtsc instruction, which counts CPU cycles in a 64-bit counter --
given the high frequencies of modern CPUs, moderately long-running
CPU-intensive processes easily overflow this counter, leading to
wrapped-around timing values and completely garbled output.
gprof, for all of its flaws, does not suffer from this problem.
T
--
Curiosity kills the cat. Moral: don't be the cat.
More information about the Digitalmars-d
mailing list