Leak with per thread debug info?

Caspole, Eric Eric.Caspole at amd.com
Wed Jun 25 18:09:25 UTC 2014


I think I found a leak with the DebugValueMaps. I wrote a test where it was creating HSA kernels on short lived threads continuously. It ends up adding a new

    public static synchronized void registerTopLevel(DebugValueMap map) {
        topLevelMaps.add(map);
    }

from here:

    public static DebugScope getInstance() {
        DebugScope result = instanceTL.get();
        if (result == null) {
            DebugScope topLevelDebugScope = new DebugScope(Thread.currentThread().getName(), "", null, false);
            instanceTL.set(topLevelDebugScope);
            DebugValueMap.registerTopLevel(topLevelDebugScope.getValueMap());
            return topLevelDebugScope;

but since my threads are short lived this ends up being a leak in the topLevelMaps. I see this in Eclipse MAT from a heap dump.
Let me know what you think,
Thanks,
Eric



More information about the graal-dev mailing list