www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Profiling

reply "Philippe Sigaud" <philippe.sigaud gmail.com> writes:
I'm trying to use the `-profile` flag for DMD and, without any 
documentation, I can't really understand the resulting log files:

* They contain only mangled names. Is there a way to get 
demangled, human-readable symbols?

* Can someone tell me what the numbers means?

Is there a page somewhere on dlang.org that explains how to use 
the profiler?

Thanks,


Philippe
Jan 24 2014
next sibling parent reply Dmitry Olshansky <dmitry.olsh gmail.com> writes:
24-Jan-2014 20:31, Philippe Sigaud пишет:
 I'm trying to use the `-profile` flag for DMD and, without any
 documentation, I can't really understand the resulting log files:

 * They contain only mangled names. Is there a way to get demangled,
 human-readable symbols?
pipe it though ddemangle tool. I though it was shipped with compiler.
 * Can someone tell me what the numbers means?
Ticks spent in this function. One column specifies inclusive time (the whole call-tree of that function) another one exclusive - time spent exactly in this function not its children.
 Is there a page somewhere on dlang.org that explains how to use the
 profiler?
http://digitalmars.com/ctg/trace.html see Dynamic Profiling With DMD
 Thanks,


 Philippe
-- Dmitry Olshansky
Jan 24 2014
next sibling parent Philippe Sigaud <philippe.sigaud gmail.com> writes:
On Fri, Jan 24, 2014 at 8:15 PM, Dmitry Olshansky <dmitry.olsh gmail.com> wrote:
 24-Jan-2014 20:31, Philippe Sigaud пишет:

 I'm trying to use the `-profile` flag for DMD and, without any
 documentation, I can't really understand the resulting log files:

 * They contain only mangled names. Is there a way to get demangled,
 human-readable symbols?
pipe it though ddemangle tool. I though it was shipped with compiler.
Maybe it is :-) I never used it, though. Will it automatically demangle all mangled symbols it finds? Can I use it on other outputs with mangled symbols?
 * Can someone tell me what the numbers means?
Ticks spent in this function. One column specifies inclusive time (the whole call-tree of that function) another one exclusive - time spent exactly in this function not its children.
OK. I get it.
 Is there a page somewhere on dlang.org that explains how to use the
 profiler?
http://digitalmars.com/ctg/trace.html see Dynamic Profiling With DMD
There it is! I knew I saw some page on profiling long ago. Must have been before the switch to dlang.org. Thanks a lot.
Jan 24 2014
prev sibling next sibling parent Brad Roberts <braddr puremagic.com> writes:
Please file a bug on this.  The docs should be on dlang.org.

On 1/24/14 11:15 AM, Dmitry Olshansky wrote:
 24-Jan-2014 20:31, Philippe Sigaud пишет:
 I'm trying to use the `-profile` flag for DMD and, without any
 documentation, I can't really understand the resulting log files:

 * They contain only mangled names. Is there a way to get demangled,
 human-readable symbols?
pipe it though ddemangle tool. I though it was shipped with compiler.
 * Can someone tell me what the numbers means?
Ticks spent in this function. One column specifies inclusive time (the whole call-tree of that function) another one exclusive - time spent exactly in this function not its children.
 Is there a page somewhere on dlang.org that explains how to use the
 profiler?
http://digitalmars.com/ctg/trace.html see Dynamic Profiling With DMD
 Thanks,


 Philippe
Jan 24 2014
prev sibling parent Philippe Sigaud <philippe.sigaud gmail.com> writes:
On Fri, Jan 24, 2014 at 8:35 PM, Brad Roberts <braddr puremagic.com> wrote:
 Please file a bug on this.  The docs should be on dlang.org.
Here it is: https://d.puremagic.com/issues/show_bug.cgi?id=11985
Jan 24 2014
prev sibling parent reply Benjamin Thaut <code benjamin-thaut.de> writes:
Am 24.01.2014 17:31, schrieb Philippe Sigaud:
 I'm trying to use the `-profile` flag for DMD and, without any
 documentation, I can't really understand the resulting log files:

 * They contain only mangled names. Is there a way to get demangled,
 human-readable symbols?

 * Can someone tell me what the numbers means?

 Is there a page somewhere on dlang.org that explains how to use the
 profiler?

 Thanks,


 Philippe
What Plattform are you profiling on?
Jan 24 2014
parent reply Philippe Sigaud <philippe.sigaud gmail.com> writes:
On Fri, Jan 24, 2014 at 10:25 PM, Benjamin Thaut <code benjamin-thaut.de> wrote:
 What Plattform are you profiling on?
Linux 32bits. Does it change something? I'm not using any OS-specific part of Phobos, AFAICT.
Jan 25 2014
parent "Benjamin Thaut" <code benjamin-thaut.de> writes:
On Saturday, 25 January 2014 at 15:34:57 UTC, Philippe Sigaud 
wrote:
 On Fri, Jan 24, 2014 at 10:25 PM, Benjamin Thaut 
 <code benjamin-thaut.de> wrote:
 What Plattform are you profiling on?
Linux 32bits. Does it change something? I'm not using any OS-specific part of Phobos, AFAICT.
Doesn't really change something. But if you would have been profiling on Windows I could have recommended some profilers / tools. Kind Regards Benjamin Thaut
Jan 26 2014