ICorProfilerInfo::BeginInprocDebugging !? 
Author Message
 ICorProfilerInfo::BeginInprocDebugging !?

Hello,

I am writing an profiler for dotNET apps using the ICorProfilerCallback
interface.

It is working good.

The problem is now, that I want to enumerate all threads and associated
callstacks at a specific point. For this I am calling
"ICorProfilerInfo::BeginInprocDebugging" from an native (profiler)
thread. It returns success. But calling "EndInprocDebugging" with the
supported value causes an crash of the app.

Is it possible to call (and use) "BeginInprocDebugging" from a different
thread than a callback is called ? There is no documentation about this
(possible) restriction !

The main goal I want to do is:

Determine the threads and associated methods which holds a GC-root
reference!

The best way would, that the GC-Root-Callbacks would provide a method and
thread (if possible, for example for static objects it is not possible)
signature of the (first) GC-Root reference to an object.

Or it would be great if I could read the callstack of all threads during
the GC-Resume-Started-Callback (which is not allowed at the moment).

Any help is appreciated.

--
Greetings
  Jochen

  Do you need a memory-leak finder ?
  http://www.*-*-*.com/



Sat, 23 Jul 2005 21:07:33 GMT  
 ICorProfilerInfo::BeginInprocDebugging !?

--------------------
| Subject: ICorProfilerInfo::BeginInprocDebugging !?


| User-Agent: Xnews/5.04.25
|
| Hello,
|
| I am writing an profiler for dotNET apps using the ICorProfilerCallback
| interface.
|
| It is working good.
|
| The problem is now, that I want to enumerate all threads and associated
| callstacks at a specific point. For this I am calling
| "ICorProfilerInfo::BeginInprocDebugging" from an native (profiler)
| thread. It returns success. But calling "EndInprocDebugging" with the
| supported value causes an crash of the app.
|
| Is it possible to call (and use) "BeginInprocDebugging" from a different
| thread than a callback is called ? There is no documentation about this
| (possible) restriction !
|
|
| The main goal I want to do is:
|
| Determine the threads and associated methods which holds a GC-root
| reference!
|
| The best way would, that the GC-Root-Callbacks would provide a method and
| thread (if possible, for example for static objects it is not possible)
| signature of the (first) GC-Root reference to an object.
|
| Or it would be great if I could read the callstack of all threads during
| the GC-Resume-Started-Callback (which is not allowed at the moment).
|
|
| Any help is appreciated.
|
| --
| Greetings
|   Jochen
|
|   Do you need a memory-leak finder ?
|   http://www.codeproject.com/useritems/leakfinder.asp
|

Hi Jochen,

I was able to contact some else at Microsoft that may be helpful.  Here's
what he said:

Im not familiar with the debugging interface, or retrieving debugging
information while in the middle of profiling. However, if all he wants is
to get a stack trace for each thread, using only the profiling interface,
then he will have to:

Watch for the creation event for each thread. (so hell have to turn on
thread creation notification)

Receive and record all function enter/exit information in order to keep
call stack information on his own. (turn on function enter/leave)

Using only a simple stack object associated with each thread will allow him
to know the callstack of any thread at any moment.

-------------------

I hope this helps.

--
Joe Massoni,
Visual C++ Team
This posting is provided AS-IS with no warranties, and confers no rights.



Wed, 10 Aug 2005 04:32:15 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. bufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbufferoverrunbuf

2. CABLE BOX DESCRAMBLER PLANS ((LEGAL)),.,.,,.,,,,,,,,,,,,,,,.,.,.,,,,,,,,,,,,,,,,,,,,,,,,.,,,,,,,,.,.,,,,,,,,,,,.,,,,,,, 8077

3. error analysis/handling/detecting/reporting/preventing/recovery/reproduce/debug

4. Printing Help please!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

5. alt.comp.databases,comp.databases,comp.databases.ms-sqlserver

6. C:\Workshop\downloads\samples\internet\ie55\RenderBehave\renderproject

7. ? HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\Root\LEGACY_

8. AFX_XXXDOC_H__E89EEE8A_EADC_11D1_9403_00A0FFFF80BB__INCLUDED_

9. Unhandled Exception: System.Configuration.ConfigurationException: Could not create System Configuration.NameValueSectionHandler, System

10. JFileChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY) in C# (.NET - openFileDialog)

11. System.Runtime.InteropServices.VTableCallsNotSupportedException

 

 
Powered by phpBB® Forum Software