reorganizing and stack collapse and flamegraph from array API