summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorWolfgang Ziegler <wziegler@live.at>2017-10-12 19:09:05 +0200
committerJan Kotas <jkotas@microsoft.com>2017-10-12 10:09:05 -0700
commit585bf85a024cf2620bead5954169b1866d332e9e (patch)
tree421d3253476840a2b0dea7fa907c8a85e78c97ca /Documentation
parent24e269058d247f9c5b7ac3f6a0401ee73e48acec (diff)
downloadcoreclr-585bf85a024cf2620bead5954169b1866d332e9e.tar.gz
coreclr-585bf85a024cf2620bead5954169b1866d332e9e.tar.bz2
coreclr-585bf85a024cf2620bead5954169b1866d332e9e.zip
Fixed Typo / C++ Syntax Highlighting (#14450)
Fixed incorrect (escaping?) characters '_' in code blocks. Enabled C++ Syntax Highlighting.
Diffstat (limited to 'Documentation')
-rw-r--r--Documentation/botr/profiling.md12
1 files changed, 8 insertions, 4 deletions
diff --git a/Documentation/botr/profiling.md b/Documentation/botr/profiling.md
index 234ac75573..1ff3c3d8f4 100644
--- a/Documentation/botr/profiling.md
+++ b/Documentation/botr/profiling.md
@@ -76,15 +76,19 @@ The picture so far describes what happens once the application and profiler are
When both checks above pass, the CLR creates an instance of the profiler in a similar fashion to _CoCreateInstance_. The profiler is not loaded through a direct call to _CoCreateInstance_ so that a call to _CoInitialize_ may be avoided, which requires setting the threading model. It then calls the _ICorProfilerCallback::Initialize_ method in the profiler. The signature of this method is:
- HRESULT Initialize(IUnknown \*pICorProfilerInfoUnk)
+```cpp
+HRESULT Initialize(IUnknown *pICorProfilerInfoUnk)
+```
The profiler must QueryInterface pICorProfilerInfoUnk for an _ICorProfilerInfo_ interface pointer and save it so that it can call for more info during later profiling. It then calls ICorProfilerInfo::SetEventMask to say which categories of notifications it is interested in. For example:
- ICorProfilerInfo\* pInfo;
+```cpp
+ICorProfilerInfo* pInfo;
- pICorProfilerInfoUnk->QueryInterface(IID\_ICorProfilerInfo, (void\*\*)&pInfo);
+pICorProfilerInfoUnk->QueryInterface(IID_ICorProfilerInfo, (void**)&pInfo);
- pInfo->SetEventMask(COR\_PRF\_MONITOR\_ENTERLEAVE | COR\_PRF\_MONITOR\_GC)
+pInfo->SetEventMask(COR_PRF_MONITOR_ENTERLEAVE | COR_PRF_MONITOR_GC)
+```
This mask would be used for a profiler interested only in function enter/leave notifications and garbage collection notifications. The profiler then simply returns, and is off and running!