[Issue 9783] New: tracing of recursive function calls yields bad timing
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 22 02:47:24 PDT 2013
http://d.puremagic.com/issues/show_bug.cgi?id=9783
Summary: tracing of recursive function calls yields bad timing
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: druntime
AssignedTo: nobody at puremagic.com
ReportedBy: r.sagitario at gmx.de
--- Comment #0 from Rainer Schuetze <r.sagitario at gmx.de> 2013-03-22 02:47:23 PDT ---
Compiling this code:
int foo(int n)
{
if (n <= 0)
return 0;
return foo(n-1) + foo(n-2);
}
void main()
{
foo(30);
}
with "dmd -profile test.d" and exceuting it yields a trace.log containing
Num Tree Func Per
Calls Time Time Call
4356617 4337248 201989 0 int test.foo(int)
1 201989 0 0 _Dmain
that reports that the tree time of foo was a lot larger than the tree time of
its only caller.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list