summaryrefslogtreecommitdiff
path: root/src/vm/perfinfo.h
blob: 4ea87f35b4d5aa316d8951ed874eb297249b3976 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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