Skip to content

Commit

Permalink
EventPipe container types optimizations. (dotnet#83251)
Browse files Browse the repository at this point in the history
During work collecting regressions statistics for dotnet#78852 I did some profiling on performance tests included in native EventPipe tests, https://github.com/dotnet/runtime/blob/main/src/mono/mono/eventpipe/test. This commit implements a couple of optimizations in the EventPipe native container classes as well as Mono's EventPipe implementation improving performance in low level native EventPipe performance tests.

Commit also includes a number of new native EventPipe tests covering optimizations done in dn_vector_ptr_t.
  • Loading branch information
lateralusX authored Mar 15, 2023
1 parent be832d7 commit 186587e
Show file tree
Hide file tree
Showing 14 changed files with 408 additions and 203 deletions.
7 changes: 4 additions & 3 deletions src/mono/mono/eventpipe/ep-rt-mono.h
Original file line number Diff line number Diff line change
Expand Up @@ -1063,9 +1063,10 @@ uint8_t *
ep_rt_valloc0 (size_t buffer_size)
{
uint8_t *buffer = (uint8_t *)mono_valloc (NULL, buffer_size, MONO_MMAP_READ | MONO_MMAP_WRITE, MONO_MEM_ACCOUNT_PROFILER);

if (buffer)
memset (buffer, 0, buffer_size);
#ifdef EP_CHECKED_BUILD
for (size_t i = 0; i < buffer_size; i++)
EP_ASSERT (buffer [i] == 0);
#endif
return buffer;
}

Expand Down
Loading

0 comments on commit 186587e

Please sign in to comment.