summaryrefslogtreecommitdiff
path: root/src/vm/domainfile.cpp
diff options
context:
space:
mode:
authorBrian Robbins <brianrob@microsoft.com>2015-11-09 17:50:56 -0800
committerBrian Robbins <brianrob@microsoft.com>2015-11-12 13:04:47 -0800
commit3801b5493e9d4b8837ceec03f49707656877fff1 (patch)
tree23828a8ede5c24422479fc062aa2800b2ffa4418 /src/vm/domainfile.cpp
parent128546aed70f8f24efebd50b0f6c358f41ff9756 (diff)
downloadcoreclr-3801b5493e9d4b8837ceec03f49707656877fff1.tar.gz
coreclr-3801b5493e9d4b8837ceec03f49707656877fff1.tar.bz2
coreclr-3801b5493e9d4b8837ceec03f49707656877fff1.zip
Enable offline generation of text-based symbol tables for native images. This is needed in order to profile applications on Linux using perf_event.
This change also modifies the runtime to emit a perfmap entry when a native image is loaded so that offline trace processing tools can identify when a perfmap file for a native image is needed and generate it.
Diffstat (limited to 'src/vm/domainfile.cpp')
-rw-r--r--src/vm/domainfile.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/vm/domainfile.cpp b/src/vm/domainfile.cpp
index c0619f49e0..ce3dff38e0 100644
--- a/src/vm/domainfile.cpp
+++ b/src/vm/domainfile.cpp
@@ -39,6 +39,10 @@
#endif
#include "winrthelpers.h"
+#ifdef FEATURE_PERFMAP
+#include "perfmap.h"
+#endif // FEATURE_PERFMAP
+
BOOL DomainAssembly::IsUnloading()
{
WRAPPER_NO_CONTRACT;
@@ -1298,6 +1302,11 @@ void DomainFile::FinishLoad()
// Inform metadata that it has been loaded from a native image
// (and so there was an opportunity to check for or fix inconsistencies in the original IL metadata)
m_pFile->GetMDImport()->SetVerifiedByTrustedSource(TRUE);
+
+#ifdef FEATURE_PERFMAP
+ // Notify the perfmap of the native image load.
+ PerfMap::LogNativeImageLoad(m_pFile);
+#endif
}
// Are we absolutely required to use a native image?