On 28 March 2016 at 21:29, cy via Digitalmars-d <digitalmars-d@puremagic.com > wrote:
> On Sunday, 27 March 2016 at 15:40:47 UTC, Marco Leise wrote: > >> Is it just me? I've never heard of a programming environment, let alone a >> system programming language providing that information. >> > > Well, not by default certainly. It is a bit pie-in-the-sky, but only > because it slows everything down. It's got the same cost as profiling. Many > languages, even C in some cases, have support for this. With gcc for > instance, if you use -finstrument-functions then it calls > __cyg_profile_func_enter before every function call and > __cyg_profile_func_exit afterwards. That can be used to accumulate _totals_ > of how many times a function was called (profiling) but it can also just > dump the called functions in order. > > I certainly would be shocked as heck if a debugger could take > non-instrumented code and add all that tracing and/or profiling stuff, but > stranger things have happened in the murky realm of code debugging. > > Most language agnostic features of gcc are possible in gdc too. Coverage and instrumentation come for free.