2016-11-28 1 views
2

ConcurrentQueueConcurrentDictionary、...、BlockingCollectionなどの同時収集のコンテンツを表示する効率的な方法はありますか?WinDbgで.NETコンカレントコレクションを表示する方法は?

がいいextension netextありますが、これは唯一の古い&良いDictionary<..>Hashtableをダンプすることができます。

正直言って、私はバケツを通過するときに私がこれをサポートしていなかったことに非常に驚いています。&頭部が邪魔になります。あなたはDMLをサポートしているWinDbgのバージョンを持っている場合は、その後の配列

ConcurrentQueue(m_arrayがクリック可能なリンクであることに注意)を表示して展開するリンクをクリックすることができますので、

答えて

1

SOSEX!mdtコマンドは、かなりOKらしいです。

0:000> !mdt 000007fe959f4770 0000000002614660 -r:5 
0000000002614660 (System.Collections.Concurrent.ConcurrentQueue`1[[System.String, mscorlib]]) 
    m_head:0000000002614690 (System.Collections.Concurrent.ConcurrentQueue`1+Segment[[System.String, mscorlib]]) 
     m_array:00000000026146d0 (System.String[], Elements: 32) 
     m_state:00000000026147e8 (System.Collections.Concurrent.VolatileBool[], Elements: 32, ElementMT=000007fef41022d8) 
     m_next:NULL (System.Collections.Concurrent.ConcurrentQueue`1+Segment[[System.__Canon, mscorlib]]) 
     m_index:0x0 (System.Int64) 
     m_low:0x0 (System.Int32) 
     m_high:0x9 (System.Int32) 
     m_source:0000000002614660 (System.Collections.Concurrent.ConcurrentQueue`1[[System.String, mscorlib]]) 
      <RECURSIVE> 
    m_tail:0000000002614690 (System.Collections.Concurrent.ConcurrentQueue`1+Segment[[System.String, mscorlib]]) 
     m_array:00000000026146d0 (System.String[], Elements: 32) 
     m_state:00000000026147e8 (System.Collections.Concurrent.VolatileBool[], Elements: 32, ElementMT=000007fef41022d8) 
     m_next:NULL (System.Collections.Concurrent.ConcurrentQueue`1+Segment[[System.__Canon, mscorlib]]) 
     m_index:0x0 (System.Int64) 
     m_low:0x0 (System.Int32) 
     m_high:0x9 (System.Int32) 
     m_source:0000000002614660 (System.Collections.Concurrent.ConcurrentQueue`1[[System.String, mscorlib]]) 
      <RECURSIVE> 
    m_serializationArray:NULL (System.__Canon[]) 
    m_numSnapshotTakers:0x0 (System.Int32) 

0:000> !mdt 00000000026146d0 
00000000026146d0 (System.String[], Elements: 32) 
expand all 32 items          <--- DML Link 

0:000> !mdt -e:2 00000000026146d0 
00000000026146d0 (System.String[], Elements: 32) 
[0] 0000000002617508 "Hello WinDbg 0" 
[1] 0000000002617670 "Hello WinDbg 1" 
[2] 00000000026177d8 "Hello WinDbg 2" 
[3] 0000000002617940 "Hello WinDbg 3" 
[4] 0000000002617aa8 "Hello WinDbg 4" 
[5] 0000000002617c10 "Hello WinDbg 5" 
[6] 0000000002617d78 "Hello WinDbg 6" 
[7] 0000000002617ee0 "Hello WinDbg 7" 
[8] 0000000002618048 "Hello WinDbg 8" 
[9] 00000000026181b0 "Hello WinDbg 9" 

ConcurrentDictionary(m_bucketsがクリック可能なリンクであることに注意してください)

0:000> !mdt 0000000002614820 -r:6 
0000000002614820 (System.Collections.Concurrent.ConcurrentDictionary`2[[System.String, mscorlib],[System.String, mscorlib]]) 
    m_tables:0000000002614eb0 (System.Collections.Concurrent.ConcurrentDictionary`2+Tables[[System.String, mscorlib],[System.String, mscorlib]]) 
     m_buckets:0000000002614d98 (System.Collections.Concurrent.ConcurrentDictionary`2+Node[[System.String, mscorlib],[System.String, mscorlib]][], Elements: 32) 
     m_locks:00000000026148e8 (System.Object[], Elements: 32) 
     m_countPerLock:0000000002614d00 (System.Int32[], Elements: 32) 
     m_comparer:00000000026148d0 (System.Collections.Generic.GenericEqualityComparer`1[[System.String, mscorlib]]) 
    m_comparer:NULL (System.Collections.Generic.IEqualityComparer`1[[System.__Canon, mscorlib]]) 
    m_growLockArray:true (System.Boolean) 
    m_keyRehashCount:0x0 (System.Int32) 
    m_budget:0x1 (System.Int32) 
    m_serializationArray:NULL (System.Collections.Generic.KeyValuePair`2[[System.__Canon, mscorlib],[System.__Canon, mscorlib]][]) 
    m_serializationConcurrencyLevel:0x0 (System.Int32) 
    m_serializationCapacity:0x0 (System.Int32) 

0:000> !mdt 0000000002614d98 
0000000002614d98 (System.Collections.Concurrent.ConcurrentDictionary`2+Node[[System.String, mscorlib],[System.String, mscorlib]][], Elements: 32) 
expand all 32 items          <--- DML Link 

0:000> !mdt -e:2 0000000002614d98 
0000000002614d98 (System.Collections.Concurrent.ConcurrentDictionary`2+Node[[System.String, mscorlib],[System.String, mscorlib]][], Elements: 32) 
[...] 
[18] 0000000002618148 (System.Collections.Concurrent.ConcurrentDictionary`2+Node[[System.String, mscorlib],[System.String, mscorlib]]) 
    m_key:00000000026180b8 (System.String) Length=7, String="Hello 8" 
    m_value:0000000002618118 (System.String) Length=8, String="WinDbg 8" 
    m_next:NULL (System.Collections.Concurrent.ConcurrentDictionary`2+Node[[System.__Canon, mscorlib],[System.__Canon, mscorlib]]) 
    m_hashcode:0xd0fe55d2 (System.Int32) 
[19] 00000000026182b0 (System.Collections.Concurrent.ConcurrentDictionary`2+Node[[System.String, mscorlib],[System.String, mscorlib]]) 
    m_key:0000000002618220 (System.String) Length=7, String="Hello 9" 
    m_value:0000000002618280 (System.String) Length=8, String="WinDbg 9" 
    m_next:NULL (System.Collections.Concurrent.ConcurrentDictionary`2+Node[[System.__Canon, mscorlib],[System.__Canon, mscorlib]]) 
    m_hashcode:0xd0fe55d3 (System.Int32) 
+0

ありがとう、明日見えるだろう。まだDMLについて聞いたことがない、私はいつも新しいことを学ぶ:) – stej

+0

これはとてもフレンドリーではないが、役に立つかもしれない。私はこの答えを受け入れるだろう。 – stej

関連する問題