It does not seem necessary to iterate over thread stacks if class unloading is disabled: all references from nmethods to oops on the heap for garbage collection should be reachable via the ClassLoaderDataGraph (via InstanceKlass::_methods). The CLDG is enumerated in full, so all nmethods, including those on the stack should be reachable.
At least Serial/Parallel and G1 seem to be affected.
At least Serial/Parallel and G1 seem to be affected.