[Issue 4708] expose rt.trace and rt.cover api's
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Aug 22 00:51:09 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4708
--- Comment #1 from Brad Roberts <braddr at puremagic.com> 2010-08-22 00:51:04 PDT ---
Merely adding the calls to set the trace log files is enough to cause the files
to be created, even without -cov. This is due to the calls being enough to
drag in the module and it's shared this/~this are invoked.
Also, for a simple test case, no trace results other than the file headers are
being produced:
module hello;
extern(C)
{
int printf(const char*, ...);
int trace_setlogfilename(string name);
int trace_setdeffilename(string name);
}
void showargs(char[][] args)
{
printf("hello world\n");
printf("args.length = %d\n", args.length);
for (int i = 0; i < args.length; i++)
printf("args[%d] = '%s'\n", i, cast(char *)args[i]);
}
int main(char[][] args)
{
trace_setlogfilename("test_results/runnable/hello-profile.d.trace.log");
trace_setdeffilename("test_results/runnable/hello-profile.d.trace.def");
showargs(args);
return 0;
}
Results in:
::::::::::::::
test_results/runnable/hello-profile.d.out
::::::::::::::
../src/dmd -Irunnable -cov -od./test_results/runnable
-of./test_results/runnable/hello-profile runnable/hello-profile.d
./test_results/runnable/hello-profile
hello world
args.length = 1
args[0] = './test_results/runnable/hello-profile'
::::::::::::::
test_results/runnable/hello-profile.d.trace.def
::::::::::::::
FUNCTIONS
::::::::::::::
test_results/runnable/hello-profile.d.trace.log
::::::::::::::
======== Timer Is 3579545 Ticks/Sec, Times are in Microsecs ========
Num Tree Func Per
Calls Time Time Call
--
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