DLP identify leaf functions

welkam wwwelkam at gmail.com
Tue Dec 11 19:34:44 UTC 2018


On Tuesday, 4 December 2018 at 11:02:11 UTC, Jacob Carlborg wrote:
> On 2018-12-02 17:57, welkam wrote:
>
>> What a timing. I am working on (slowly) on a tool that would 
>> get all struct and class declarations and for each of them get 
>> functions in which they are used. Then combine them with 
>> profiling data to find data structures that are hot and how 
>> changing them affects performance. The only code that is 
>> written is partially parsing perf.data file and the rest is 
>> missing. It would be wonderful if your tool could emit such 
>> functions then my job would be easy. Parsing would have been 
>> done if perf.data format was fully documented.
>
> Something like "find all references"?

Late response is better than none i guess. References are bad 
word because it could mean references as passed to functions or 
pointers. What I am looking is occurrences in functions. Whether 
class/struct is created or passed trough pointer I want to know 
about it. If class/struct is put into container I want to track 
that as well. I want to know all uses of that data type.

One frequent thing people say on reddit is that phobos is based 
on GC. It would be nice if there was a tool that could report 
what percentage of functions actually use GC and what are marked 
as @nogc


More information about the Digitalmars-d-announce mailing list