www.digitalmars.com         C & C++   DMDScript  

D - Profiler

reply "anderson" <anderson firestar.com.au> writes:
Does D have any profilers built into it? (If so skip the rest).

If it doesn't I think it would be cool if there was something built into the
complier or standard lib to simplify the process.  It could be removed in
the release like contracts.  Perhaps it could be part of contracts.  Perhaps
it can already be done with a timer and contracts, but I'm looking for
something more sophisticated.  Perhaps it could be done in a meta-language,
but that's never as nice as having it direct in the language itself.

I don't know what the final version would look like, I'm hoping you peoples
could help fill in those details.  Parhaps it could be an extention to
contracts.

It should be able to inform how long (and how many times) lines, procedure,
ect... are peformed.

Parhaps a syntax format (something to begin with working with anyhow).

Profiler("Test 1", LINE_BY_LINE)
{
    ...
}

Where test 1 gives the each profile a name.

And parhaps you could specify to the complier where to output the profiler
results (and when to turn it off and on).

They could also be nested.

Profiler("Test 1", LINE_BY_LINE)
{
    Profiler("Test 2", PROC_BY_PROC)
    {
        ...
    }
}

And it would return some comprehesive set of results for anaysis.  It would
be really useful in performace programming (but I don't need to tell you
that).
Oct 16 2002
parent reply Burton Radons <loth users.sourceforge.net> writes:
anderson wrote:
 Does D have any profilers built into it? (If so skip the rest).

"-gt" adds trace profiling hooks.
Oct 15 2002
parent reply "Walter" <walter digitalmars.com> writes:
"Burton Radons" <loth users.sourceforge.net> wrote in message
news:aoig72$19fa$1 digitaldaemon.com...
 anderson wrote:
 Does D have any profilers built into it? (If so skip the rest).

"-gt" adds trace profiling hooks.

The trace profiler is actually highly useful. I've used it a lot, and it's the reason why DMC is the fastest compiler available.
Oct 20 2002
parent reply Evan McClanahan <evan dontSPAMaltarinteractive.com> writes:
Walter wrote:
 "Burton Radons" <loth users.sourceforge.net> wrote in message
 news:aoig72$19fa$1 digitaldaemon.com...
 
anderson wrote:

Does D have any profilers built into it? (If so skip the rest).

"-gt" adds trace profiling hooks.

The trace profiler is actually highly useful. I've used it a lot, and it's the reason why DMC is the fastest compiler available.

I suppose that this applies to the Exceptions thread above, also. When I use vtune with the -gt compiled version of a d program, it can't fnid the symbols or the source. Will the VS profiler handle this correctly, or is there some other profiler that you reccommend for use with d? Evan
Oct 22 2002
parent "Walter" <walter digitalmars.com> writes:
"Evan McClanahan" <evan dontSPAMaltarinteractive.com> wrote in message
news:ap39tq$gh1$1 digitaldaemon.com...
 Walter wrote:
 "Burton Radons" <loth users.sourceforge.net> wrote in message
 news:aoig72$19fa$1 digitaldaemon.com...
anderson wrote:
Does D have any profilers built into it? (If so skip the rest).




 the reason why DMC is the fastest compiler available.

I use vtune with the -gt compiled version of a d program, it can't fnid the symbols or the source. Will the VS profiler handle this correctly, or is there some other profiler that you reccommend for use with d?

Vtune should be used with -g to emit symbolic debug info. The -gt is for the Digital Mars trace profiler, which has nothing for vtune.
Oct 24 2002