summaryrefslogtreecommitdiff
path: root/src/vm/perfinfo.h
diff options
context:
space:
mode:
authorLuca <luca.duran@hotmail.com>2016-04-06 11:35:15 -0700
committerLuca <luca.duran@hotmail.com>2016-04-06 11:35:15 -0700
commit484c855fe4a91a8ea67213457d69182669c65ded (patch)
treed65a4144c4f30e8174d23badbd22ffea026632c5 /src/vm/perfinfo.h
parent682fecce57649bc10766936c0f6d405abc1250de (diff)
downloadcoreclr-484c855fe4a91a8ea67213457d69182669c65ded.tar.gz
coreclr-484c855fe4a91a8ea67213457d69182669c65ded.tar.bz2
coreclr-484c855fe4a91a8ea67213457d69182669c65ded.zip
Allow logging of image loading
Diffstat (limited to 'src/vm/perfinfo.h')
-rw-r--r--src/vm/perfinfo.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/vm/perfinfo.h b/src/vm/perfinfo.h
new file mode 100644
index 0000000000..4ea87f35b4
--- /dev/null
+++ b/src/vm/perfinfo.h
@@ -0,0 +1,40 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+// ===========================================================================
+// File: perfinfo.h
+//
+
+#ifndef PERFINFO_H
+#define PERFINFO_H
+
+
+#include "sstring.h"
+#include "fstream.h"
+
+/*
+ A perfinfo-%d.map is created for every process that is created with manage code, the %d
+ being repaced with the process ID.
+ Every line in the perfinfo-%d.map is a type and value, separated by sDelimiter character: type;value
+ type represents what the user might want to do with its given value. value has a format chosen by
+ the user for parsing later on.
+*/
+class PerfInfo {
+public:
+ PerfInfo(int pid);
+ ~PerfInfo();
+ void LogImage(PEFile* pFile, WCHAR* guid);
+
+private:
+ CFileStream* m_Stream;
+
+ const char sDelimiter = ';';
+
+ void OpenFile(SString& path);
+
+ void WriteLine(SString& type, SString& value);
+
+};
+
+
+#endif