Adjust Mono EventPipe/DiagnosticServer C library to better support CoreCLR shim....
authorJohan Lorensson <lateralusx.github@gmail.com>
Tue, 17 Nov 2020 08:24:39 +0000 (09:24 +0100)
committerGitHub <noreply@github.com>
Tue, 17 Nov 2020 08:24:39 +0000 (09:24 +0100)
commitf6bfec0513254378b11539c6bf8f1ab4852d7847
tree8a986d8df94fe4db9a978c8b7e1a6b91d63ae078
parenta5d6b300675874998b70d5eef63fa5320dc3b06f
Adjust Mono EventPipe/DiagnosticServer C library to better support CoreCLR shim. (#44527)

* Adjust EventPipe/DiagnosticServer C library to support CoreCLR shim.

Adjustments done to better align with implementation of CoreCLR shim
using CoreCLR artifacts and C++ code (CoreCLR implementation done in
separate PR).

Disconnect runtime specific shim info from shared sources, all included
shim files handled through defines.

Exception safety and improved error handling, adding error checking
and error returns into shim container functions.

Walkthrough of codebase, aligning with gaps from CoreCLR + port of
sample profiler and json file serializer.

Implement core dump diagnostic command and runtime layer (needed by CoreCLR,
currently not implemented on Mono).

Implemented process env diagnostic command and runtime layer.

Implemented profiler attach diagnostic command and runtime layer (needed by
CoreCLR, currently not implemented on Mono).

Fix native EventPipe test aligning with changes.

* Fix build errors.

* Review feedback.
76 files changed:
src/mono/mono/eventpipe/CMakeLists.txt
src/mono/mono/eventpipe/Makefile.am
src/mono/mono/eventpipe/ds-dump-protocol.c
src/mono/mono/eventpipe/ds-dump-protocol.h
src/mono/mono/eventpipe/ds-eventpipe-protocol.c
src/mono/mono/eventpipe/ds-eventpipe-protocol.h
src/mono/mono/eventpipe/ds-ipc-posix.c
src/mono/mono/eventpipe/ds-ipc-win32.c
src/mono/mono/eventpipe/ds-ipc.c
src/mono/mono/eventpipe/ds-ipc.h
src/mono/mono/eventpipe/ds-process-protocol.c
src/mono/mono/eventpipe/ds-process-protocol.h
src/mono/mono/eventpipe/ds-profiler-protocol.c
src/mono/mono/eventpipe/ds-profiler-protocol.h
src/mono/mono/eventpipe/ds-protocol.c
src/mono/mono/eventpipe/ds-protocol.h
src/mono/mono/eventpipe/ds-rt-config.h
src/mono/mono/eventpipe/ds-rt-mono.c
src/mono/mono/eventpipe/ds-rt-mono.h
src/mono/mono/eventpipe/ds-rt-types-mono.h
src/mono/mono/eventpipe/ds-rt-types.h
src/mono/mono/eventpipe/ds-rt.h
src/mono/mono/eventpipe/ds-server.c
src/mono/mono/eventpipe/ds-types.h
src/mono/mono/eventpipe/ds.c [new file with mode: 0644]
src/mono/mono/eventpipe/ep-block.c
src/mono/mono/eventpipe/ep-block.h
src/mono/mono/eventpipe/ep-buffer-manager.c
src/mono/mono/eventpipe/ep-buffer-manager.h
src/mono/mono/eventpipe/ep-buffer.c
src/mono/mono/eventpipe/ep-buffer.h
src/mono/mono/eventpipe/ep-config.c
src/mono/mono/eventpipe/ep-config.h
src/mono/mono/eventpipe/ep-event-instance.c
src/mono/mono/eventpipe/ep-event-instance.h
src/mono/mono/eventpipe/ep-event-payload.c
src/mono/mono/eventpipe/ep-event-payload.h
src/mono/mono/eventpipe/ep-event-source.c
src/mono/mono/eventpipe/ep-event-source.h
src/mono/mono/eventpipe/ep-file.c
src/mono/mono/eventpipe/ep-file.h
src/mono/mono/eventpipe/ep-json-file.c [new file with mode: 0644]
src/mono/mono/eventpipe/ep-json-file.h [new file with mode: 0644]
src/mono/mono/eventpipe/ep-metadata-generator.c
src/mono/mono/eventpipe/ep-metadata-generator.h
src/mono/mono/eventpipe/ep-provider-internals.h
src/mono/mono/eventpipe/ep-provider.c
src/mono/mono/eventpipe/ep-rt-config-mono.h
src/mono/mono/eventpipe/ep-rt-config.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/ep-rt-types.h
src/mono/mono/eventpipe/ep-rt.h
src/mono/mono/eventpipe/ep-sample-profiler.c [new file with mode: 0644]
src/mono/mono/eventpipe/ep-sample-profiler.h [new file with mode: 0644]
src/mono/mono/eventpipe/ep-session-provider.c
src/mono/mono/eventpipe/ep-session-provider.h
src/mono/mono/eventpipe/ep-session.c
src/mono/mono/eventpipe/ep-session.h
src/mono/mono/eventpipe/ep-stack-contents.h
src/mono/mono/eventpipe/ep-stream.c
src/mono/mono/eventpipe/ep-thread.c
src/mono/mono/eventpipe/ep-thread.h
src/mono/mono/eventpipe/ep-types.h
src/mono/mono/eventpipe/ep.c
src/mono/mono/eventpipe/ep.h
src/mono/mono/eventpipe/test/ep-buffer-manager-tests.c
src/mono/mono/eventpipe/test/ep-buffer-tests.c
src/mono/mono/eventpipe/test/ep-provider-callback-dataqueue-tests.c
src/mono/mono/eventpipe/test/ep-session-tests.c
src/mono/mono/eventpipe/test/ep-tests.c
src/mono/mono/eventpipe/test/ep-thread-tests.c
src/mono/mono/metadata/icall-eventpipe.c
src/mono/msvc/libeventpipe.targets
src/mono/msvc/libeventpipe.targets.filters