Event Pipe File V3 (#16107)
authorAdam Sitnik <adam.sitnik@gmail.com>
Fri, 2 Feb 2018 22:07:25 +0000 (23:07 +0100)
committerGitHub <noreply@github.com>
Fri, 2 Feb 2018 22:07:25 +0000 (23:07 +0100)
commitf6ba335278bb966e8e5f9cd33f51818c6fac44fa
tree34f19451c962381c3d834fa8db5f334556390756
parent70bf6a4586b3cad9cf8cc26ca85ec6d552123202
Event Pipe File V3 (#16107)

* write missing information to the event pipe file (pointer size to make it work fo x86)

* define where the events start, not only where they end

* include process Id in the event pipe file, bump the version so old consumers get clear error message

* write the missing EndObject tag to close the header

* include expected CPU sampling rate in the event pipe header file

* include keywords in V3 of EventPipe metadata, fixes #11934

* remove forward references

* entry object comes after the header and ends after it's data, before the event block objects

* introduce event block

* fix the GC contracts

* generate metadata ids

* end the file with null reference tag

* getting it work

* 4 byte alignment of serialized event data

* Revert "include keywords in V3 of EventPipe metadata, fixes #11934"

This reverts commit 98ef2f588e271f928fd051e96da526dc1e0f017c.

* remove event Id and event version from metadata buffer (it was duplicated with native code)

* increase the block size to be the same as buffer size

* Write the last event block to the file after disabling the event pipe, right after last events

* include the sife in itself

* the native part was supposed to not duplicate the event id and version, not manged

* ensure 4 byte alignment

* build metadata when it's not provided, so payload is never empty (no need to serialize length)

* this todo is no longer valid

* don't align everything, just the content of event block as suggested by @vancem

* improvements after code review

* update TraceEvent dependency, make the test verify new feature

* InterlockedIncrement(Int32) is not available for non-Windows OSes

* code improvements after Skype code review from @jorive
18 files changed:
dependencies.props
src/vm/CMakeLists.txt
src/vm/eventpipeblock.cpp [new file with mode: 0644]
src/vm/eventpipeblock.h [new file with mode: 0644]
src/vm/eventpipebuffer.cpp
src/vm/eventpipebuffermanager.cpp
src/vm/eventpipeconfiguration.cpp
src/vm/eventpipeconfiguration.h
src/vm/eventpipeevent.cpp
src/vm/eventpipeevent.h
src/vm/eventpipeeventinstance.cpp
src/vm/eventpipeeventinstance.h
src/vm/eventpipefile.cpp
src/vm/eventpipefile.h
src/vm/fastserializer.cpp
src/vm/fastserializer.h
src/vm/sampleprofiler.h
tests/src/tracing/eventpipetrace/EventPipeTrace.cs