none
Turn ON and OFF the Event Mask in Run time (corprofiler) RRS feed

  • Question

  • Hi,

    I have my own .net CLR profiler that's using Corprofiler API,
    Initially when the application starts,i have set the event mask like below,

     hr = m_pProfilerInfo->SetEventMask(
    	 COR_PRF_MONITOR_APPDOMAIN_LOADS |		
             COR_PRF_MONITOR_MODULE_LOADS |		
             COR_PRF_MONITOR_CLASS_LOADS |		
             COR_PRF_MONITOR_THREADS |		
             COR_PRF_MONITOR_ASSEMBLY_LOADS );

    In Run time,i want to enable "COR_PRF_MONITOR_GC". After Five minutes i set the event mask again including "COR_PRF_MONITOR_GC" as below,

     hr = m_pProfilerInfo->SetEventMask(
    	COR_PRF_MONITOR_APPDOMAIN_LOADS |
    	COR_PRF_MONITOR_MODULE_LOADS |	
    	COR_PRF_MONITOR_CLASS_LOADS |	 
            COR_PRF_MONITOR_GC |
            COR_PRF_MONITOR_THREADS |		
            COR_PRF_MONITOR_ASSEMBLY_LOADS );

    Here the function getting failed.The value of hr = 80131376 (HRESULT). After few minutes i wants to disable the mask "COR_PRF_MONITOR_GC". As referred to  documents it is said that the mask can be turned on and off in the runtime.

    so, How to achieve this?

    Thanks in advance.


    Wednesday, March 7, 2018 9:35 AM

Answers