Add per thread profiling support to s390x