microsoft / perfview

PerfView is a CPU and memory performance-analysis tool
http://channel9.msdn.com/Series/PerfView-Tutorial
MIT License
4.12k stars 704 forks source link

[Proposal] Add System.Buffers.ArrayPoolEventSource to the list of default .NET Providers #932

Open adamsitnik opened 5 years ago

adamsitnik commented 5 years ago

ArrayPool has it's own EventSource It emits 3 events:

When using PerfView I very often add it manually to the list of Additional Providers to make sure that ArrayPool is used correctly.

My proposal: add System.Buffers.ArrayPoolEventSource to the list of default .NET Providers.

@billwert @brianrob If you are OK with that I would like to send a PR with the required change.

brianrob commented 5 years ago

How much volume do you expect to get from this? Right now, I feel like this is useful is specific cases, but not necessarily in the general case. If I think about leak analysis, this would show up in allocation tick events and we'd be able to tell that the allocator is the ArrayPool (and then head down that path of investigation). Are there more general cases where this shows us information that we wouldn't otherwise have?

adamsitnik commented 5 years ago

How much volume do you expect to get from this?

It depends on the usage of ArrayPool but I don't think that volume would be big.

Perhaps a middle ground solution would be to enable only the BufferAllocated (Level=Informational) events by default? It would show up in applications that use ArrayPool in the wrong way (a dev wanted to pool memory but is allocating it every time instead).