Implement native container types used by shared EventPipe code. (#78852)
authorJohan Lorensson <lateralusx.github@gmail.com>
Fri, 10 Mar 2023 08:23:08 +0000 (09:23 +0100)
committerGitHub <noreply@github.com>
Fri, 10 Mar 2023 08:23:08 +0000 (09:23 +0100)
commit1d5c424487c476831d9f98b1ca78b4fda6d18066
tree0f4991a911707fc47eaba91ce32ad2ccf935b2d7
parent286da9e6a400b63768efa7065c2f636de2d09cd8
Implement native container types used by shared EventPipe code. (#78852)

* Implement native container types used by shared EventPipe code.

Use eglib's list, slist, array, ptr_array, queue, hash table as a starting point creating a new set of native container types shared between native runtime components like EventPipe.

EventPipe shim container API used a STL like API, new container types follows STL style container API and match STL type names:

vector
forward list
list
queue
unordered map

Native container types are still included in runtime build artifacts (through EventPipe cmake files), this can be changed/done differently depending on how each runtime would like to build/use the source files. In order to make that intent more clear, container and EventPipe cmake files have been renamed to not use CMakeList.txt, but .cmake.

A number of new native tests for added container types have been added into EventPipe native test runner.
82 files changed:
src/coreclr/nativeaot/Runtime/EmptyContainers.h [deleted file]
src/coreclr/nativeaot/Runtime/EmptyContainers2.h [deleted file]
src/coreclr/nativeaot/Runtime/eventpipe/CMakeLists.txt
src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-aot.h
src/coreclr/nativeaot/Runtime/eventpipe/ds-rt-types-aot.h
src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-aot.h
src/coreclr/nativeaot/Runtime/eventpipe/ep-rt-types-aot.h
src/coreclr/vm/eventing/eventpipe/CMakeLists.txt
src/coreclr/vm/eventing/eventpipe/ds-rt-coreclr.h
src/coreclr/vm/eventing/eventpipe/ds-rt-types-coreclr.h
src/coreclr/vm/eventing/eventpipe/ep-rt-coreclr.h
src/coreclr/vm/eventing/eventpipe/ep-rt-types-coreclr.h
src/mono/mono/component/CMakeLists.txt
src/mono/mono/eglib/test/test.c
src/mono/mono/eventpipe/ds-rt-mono.h
src/mono/mono/eventpipe/ds-rt-types-mono.h
src/mono/mono/eventpipe/ep-rt-config-mono.h
src/mono/mono/eventpipe/ep-rt-mono.c
src/mono/mono/eventpipe/ep-rt-mono.h
src/mono/mono/eventpipe/ep-rt-types-mono.h
src/mono/mono/eventpipe/eventpipe.cmake [moved from src/mono/mono/eventpipe/CMakeLists.txt with 90% similarity]
src/mono/mono/eventpipe/test/CMakeLists.txt
src/mono/mono/eventpipe/test/dn-fwd-list-tests.c [new file with mode: 0644]
src/mono/mono/eventpipe/test/dn-list-tests.c [new file with mode: 0644]
src/mono/mono/eventpipe/test/dn-queue-tests.c [new file with mode: 0644]
src/mono/mono/eventpipe/test/dn-umap-tests.c [new file with mode: 0644]
src/mono/mono/eventpipe/test/dn-vector-ptr-tests.c [new file with mode: 0644]
src/mono/mono/eventpipe/test/dn-vector-tests.c [new file with mode: 0644]
src/mono/mono/eventpipe/test/ep-buffer-manager-tests.c
src/mono/mono/eventpipe/test/ep-tests.c
src/mono/mono/eventpipe/test/ep-tests.h
src/native/containers/containers.cmake [new file with mode: 0644]
src/native/containers/dn-allocator.c [new file with mode: 0644]
src/native/containers/dn-allocator.h [new file with mode: 0644]
src/native/containers/dn-fwd-list.c [new file with mode: 0644]
src/native/containers/dn-fwd-list.h [new file with mode: 0644]
src/native/containers/dn-list.c [new file with mode: 0644]
src/native/containers/dn-list.h [new file with mode: 0644]
src/native/containers/dn-queue.c [new file with mode: 0644]
src/native/containers/dn-queue.h [new file with mode: 0644]
src/native/containers/dn-sort-frag.inc [new file with mode: 0644]
src/native/containers/dn-umap-t.h [new file with mode: 0644]
src/native/containers/dn-umap.c [new file with mode: 0644]
src/native/containers/dn-umap.h [new file with mode: 0644]
src/native/containers/dn-utils.h [new file with mode: 0644]
src/native/containers/dn-vector-priv.h [new file with mode: 0644]
src/native/containers/dn-vector-ptr.h [new file with mode: 0644]
src/native/containers/dn-vector-t.h [new file with mode: 0644]
src/native/containers/dn-vector-types.h [new file with mode: 0644]
src/native/containers/dn-vector.c [new file with mode: 0644]
src/native/containers/dn-vector.h [new file with mode: 0644]
src/native/eventpipe/ds-eventpipe-protocol.c
src/native/eventpipe/ds-eventpipe-protocol.h
src/native/eventpipe/ds-ipc.c
src/native/eventpipe/ds-process-protocol.c
src/native/eventpipe/ds-process-protocol.h
src/native/eventpipe/ds-rt-types.h
src/native/eventpipe/ds-rt.h
src/native/eventpipe/ep-block.c
src/native/eventpipe/ep-buffer-manager.c
src/native/eventpipe/ep-buffer-manager.h
src/native/eventpipe/ep-config.c
src/native/eventpipe/ep-config.h
src/native/eventpipe/ep-event-instance.c
src/native/eventpipe/ep-event-instance.h
src/native/eventpipe/ep-file.c
src/native/eventpipe/ep-file.h
src/native/eventpipe/ep-provider.c
src/native/eventpipe/ep-provider.h
src/native/eventpipe/ep-rt-types.h
src/native/eventpipe/ep-rt.h
src/native/eventpipe/ep-session-provider.c
src/native/eventpipe/ep-session-provider.h
src/native/eventpipe/ep-session.c
src/native/eventpipe/ep-session.h
src/native/eventpipe/ep-stream.h
src/native/eventpipe/ep-thread.c
src/native/eventpipe/ep-thread.h
src/native/eventpipe/ep-types-forward.h
src/native/eventpipe/ep-types.h
src/native/eventpipe/ep.c
src/native/eventpipe/eventpipe.cmake [moved from src/native/eventpipe/CMakeLists.txt with 100% similarity]