summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorBrian Robbins <brianrob@microsoft.com>2017-05-06 12:36:08 -0700
committerVance Morrison <vancem@microsoft.com>2017-05-06 12:36:08 -0700
commit72ac46450bec8ea88ed023d9c1faf5a04556c834 (patch)
tree59085824f4268257d041ed9870f038216cd8ed45 /build.sh
parent3ababc21ab334a2e37c6ba4115c946ea26a6f2fb (diff)
downloadcoreclr-72ac46450bec8ea88ed023d9c1faf5a04556c834.tar.gz
coreclr-72ac46450bec8ea88ed023d9c1faf5a04556c834.tar.bz2
coreclr-72ac46450bec8ea88ed023d9c1faf5a04556c834.zip
Log Events to EventPipe on Linux (#11433)
* Implement the EventPipe object model for providers and events. * Plumb Runtime Events into EventPipe (#11145) Plumb runtime ETW events into the EventPipe. * Fix bug where all events except for SampleProfiler events were never enabled. * Plumb EventPipeEventInstance through the EventPipe. * Implement EventPipeFile and FastSerializer. * Write event contents to the EventPipeFile. * Only build EventPipe on Linux. * Conditionally add a sentinel value marking event end. * Send SampleProfiler events to the EventPipeFile. * Fix provider ID printing to JSON file. * Write the start date/time, timestamp, and clock frequency into the trace file. * Support unloading of EventPipeProviders. * Handle failure cases when we can't walk the stack or are shutting down. * Fix a bug where we pass a null src pointer to memcpy.
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh32
1 files changed, 32 insertions, 0 deletions
diff --git a/build.sh b/build.sh
index 12b7b726c4..39e96dd6f9 100755
--- a/build.sh
+++ b/build.sh
@@ -154,15 +154,27 @@ generate_event_logging_sources()
# Event Logging Infrastructure
__GeneratedIntermediate="$__IntermediatesDir/Generated"
__GeneratedIntermediateEventProvider="$__GeneratedIntermediate/eventprovider_new"
+ __GeneratedIntermediateEventPipe="$__GeneratedIntermediate/eventpipe_new"
+
if [[ -d "$__GeneratedIntermediateEventProvider" ]]; then
rm -rf "$__GeneratedIntermediateEventProvider"
fi
+ if [[ -d "$__GeneratedIntermediateEventPipe" ]]; then
+ rm -rf "$__GeneratedIntermediateEventPipe"
+ fi
+
if [[ ! -d "$__GeneratedIntermediate/eventprovider" ]]; then
mkdir -p "$__GeneratedIntermediate/eventprovider"
fi
+ if [[ ! -d "$__GeneratedIntermediate/eventpipe" ]]; then
+ mkdir -p "$__GeneratedIntermediate/eventpipe"
+ fi
+
mkdir -p "$__GeneratedIntermediateEventProvider"
+ mkdir -p "$__GeneratedIntermediateEventPipe"
+
if [[ $__SkipCoreCLR == 0 || $__ConfigureOnly == 1 ]]; then
echo "Laying out dynamically generated files consumed by the build system "
echo "Laying out dynamically generated Event Logging Test files"
@@ -172,6 +184,18 @@ generate_event_logging_sources()
exit
fi
+ case $__BuildOS in
+ Linux)
+ echo "Laying out dynamically generated EventPipe Implementation"
+ $PYTHON -B -Wall -Werror "$__ProjectRoot/src/scripts/genEventPipe.py" --man "$__ProjectRoot/src/vm/ClrEtwAll.man" --intermediate "$__GeneratedIntermediateEventPipe" --exc "$__ProjectRoot/src/vm/ClrEtwAllMeta.lst"
+ if [[ $? != 0 ]]; then
+ exit
+ fi
+ ;;
+ *)
+ ;;
+ esac
+
#determine the logging system
case $__BuildOS in
Linux)
@@ -193,6 +217,14 @@ generate_event_logging_sources()
fi
rm -rf "$__GeneratedIntermediateEventProvider"
+
+ echo "Cleaning the temp folder of dynamically generated EventPipe files"
+ $PYTHON -B -Wall -Werror -c "import sys;sys.path.insert(0,\"$__ProjectRoot/src/scripts\"); from Utilities import *;UpdateDirectory(\"$__GeneratedIntermediate/eventpipe\",\"$__GeneratedIntermediateEventPipe\")"
+ if [[ $? != 0 ]]; then
+ exit
+ fi
+
+ rm -rf "$__GeneratedIntermediateEventPipe"
}
build_native()