[Mono.Profiler.Log] Load entire buffers before processing them.
authorAlex Rønne Petersen <alpeters@microsoft.com>
Wed, 20 Sep 2017 12:32:07 +0000 (14:32 +0200)
committerAlex Rønne Petersen <alpeters@microsoft.com>
Wed, 20 Sep 2017 12:32:07 +0000 (14:32 +0200)
commita6aa45cc948a31d131320bd05d76d9013744a1af
tree207136f21cb19db2e135f0e8167f477e5dfa04d4
parentdcbbe94d4e9c0cab8848946797a916f4ae0bdc1d
[Mono.Profiler.Log] Load entire buffers before processing them.

This should reduce the amount of I/O system calls we do, and should be fine
in terms of memory usage since the profiler tries to keep buffers small (64k),
and latency since the profiler flushes buffers every second.

This changes the API somewhat so that users no longer have to construct a
LogReader; this is now done internally, and the type is no longer public. Also,
the LogProcessor now leaves the given stream open, so it's up to the user to
close it.
mcs/class/Mono.Profiler.Log/Mono.Profiler.Log/LogProcessor.cs
mcs/class/Mono.Profiler.Log/Mono.Profiler.Log/LogReader.cs