Add a stack inspector mechanism which will work on any JVM (but optimized for some)