ashmind / SharpLab

.NET language playground
https://sharplab.io
BSD 2-Clause "Simplified" License
2.71k stars 198 forks source link

feature request: support reference type metadata information #276

Open cyrilmagsuci opened 6 years ago

cyrilmagsuci commented 6 years ago

Currently sharplab has awesome feature that can display memory heap structure such like this

https://sharplab.io/#v2:C4LgTgrgdgNAJiA1AHwAIAYAEqCMBuAWAChUBmbHANmwCYKB2TAb2Mze3N2tQBYKAOABQBKZq3YSAklADOABwCmAY2AA6ABIKAhnMFQFAd0wBhEcMJEJAX2Li2qOsbGWJ7AJZRgmLZgC8mfDtXACMAT2AFTGC/TBoLV3dPTCUY0nj2GyIrIA

When trying out some code optimization such as multi thread locking, one can inspect the sync block to know more about other information such as locks and hash code on the instance.

An explanation is described here https://stackoverflow.com/questions/1803298/what-is-a-sync-block-and-tips-for-reducing-the-count

It would be nice feature to support displaying of metadata information such as the sync block and handle block so that one not need to know about windows native debugging (ildasm, memory dumping, etc..) in order to know how to optimise a piece of code.

ashmind commented 6 years ago

Thanks for the idea -- looks interesting, I'll look into it. One limitation is that Run mode currently does not support multi-threading over stability concerns, however I plan to implement that eventually.