@@ -148,7 +148,7 @@ public void Run(string args)
148148 _host . WriteLine ( string . Format ( " {0,4}\r \n " , _workItemCount . ToString ( ) ) ) ;
149149 }
150150
151- var threadPool = _host . Session . Clr . GetThreadPool ( ) ;
151+ var threadPool = _host . Session . Clr . ThreadPool ;
152152 _host . WriteLine ( string . Format (
153153 "\r \n CPU = {0}% for {1} threads (#idle = {2} + #running = {3} | #dead = {4} | #max = {5})" ,
154154 threadPool . CpuUtilization . ToString ( ) ,
@@ -297,7 +297,7 @@ private string GetCallStackInfo(ClrMDHelper helper, ClrThread thread)
297297 string shortTypeName = "" ;
298298 if ( bi . ObjRef != 0 )
299299 {
300- ClrType type = _host . Session . Clr . GetHeap ( ) . GetObjectType ( bi . ObjRef ) ;
300+ ClrType type = _host . Session . Clr . Heap . GetObjectType ( bi . ObjRef ) ;
301301 if ( type != null )
302302 {
303303 string typeName = type . Name ;
@@ -386,7 +386,7 @@ public void RunDone()
386386 //
387387 try
388388 {
389- var heap = _host . Session . Clr . GetHeap ( ) ;
389+ var heap = _host . Session . Clr . Heap ;
390390 var clr = _host . Session . Clr ;
391391
392392 _host . WriteLine ( "global work item queue________________________________" ) ;
@@ -487,7 +487,7 @@ public void RunDone()
487487 _host . WriteLine ( string . Format ( " {0,4}\r \n " , _workItemCount . ToString ( ) ) ) ;
488488 }
489489
490- var threadPool = _host . Session . Clr . GetThreadPool ( ) ;
490+ var threadPool = _host . Session . Clr . ThreadPool ;
491491 _host . WriteLine ( string . Format (
492492 "\r \n CPU = {0}% for {1} threads (#idle = {2} + #running = {3} | #dead = {4} | #max = {5})" ,
493493 threadPool . CpuUtilization . ToString ( ) ,
@@ -639,7 +639,7 @@ public void RunWithAPI()
639639
640640 try
641641 {
642- var threadPool = _host . Session . Clr . GetThreadPool ( ) ;
642+ var threadPool = _host . Session . Clr . ThreadPool ;
643643
644644 foreach ( var work in threadPool . EnumerateManagedWorkItems ( ) )
645645 {
@@ -747,7 +747,7 @@ public void RunOriginal()
747747
748748
749749 // provide a summary sorted by count
750- var threadPool = _host . Session . Clr . GetThreadPool ( ) ;
750+ var threadPool = _host . Session . Clr . ThreadPool ;
751751 _host . WriteLine ( string . Format (
752752 "CPU = {0}% for {1} threads (#idle = {2} + #running = {3} | #dead = {4} | #max = {5})" ,
753753 threadPool . CpuUtilization . ToString ( ) ,
@@ -781,16 +781,7 @@ public void RunOriginal()
781781 private string GetFrameInformation ( ClrThread thread , ClrStackFrame frame , ClrStackFrame firstFrame )
782782 {
783783 // get the method call from the given frame
784- string info = "" ;
785- var sourceLocation = frame . GetFileAndLineNumber ( ) ;
786- if ( sourceLocation == null )
787- {
788- info = frame . DisplayString ;
789- }
790- else // it seems that GetFileAndLineNumber() does not work --> need to figure out what is the other ClrMD API to dig into the symbols
791- {
792- info = frame . DisplayString + "[" + sourceLocation . FilePath + ", Line " + sourceLocation . LineNumber . ToString ( ) + "]" ;
793- }
784+ string info = frame . DisplayString ;
794785
795786 // look for locking information
796787 if ( firstFrame . Method . Name . Contains ( "Wait" ) || ( firstFrame . Method . Name == "Enter" ) && ( firstFrame . Method . Type . Name == "System.Threading.Monitor" ) )
0 commit comments