kevingosse / GummyCat

MIT License
162 stars 10 forks source link

Attache to AOT app #15

Open latop2604 opened 8 months ago

latop2604 commented 8 months ago

Hello, I tried to attach gummycat to an aot compiled app (with eventsource enabled).

But it crash while trying to create runtime here :

        `var runtime = dataTarget.ClrVersions[0].CreateRuntime();`

The issue is that for AOT app the ClrVersions array is empty.

If I comment out this line and stuff that depends on it, the right panel show gc events, but nothing in the memory visualization part.

Is there a way to manually create a ClrVersion or Runtime object?

kevingosse commented 8 months ago

ClrMD (the part with the ClrVersion and ClrRuntime) is not compatible with NativeAOT, and I doubt it ever will.

Part of the information that I use ClrMD for can be retrieved from GC events, so maybe I can implement some kind of degraded mode. I'm not 100% sure there will be enough information for the visualization but it's worth trying.