Hi @Developer Tools Engineer
Mac M2 reproduced the same issue: xctrace CPU Counters Sample By Events hangs.
xctrace record --template 'MyTemplate' --launch -- /Users/zhaixiang/jdk-21.jdk/Contents/Home/bin/java -version
Starting recording with the MyTemplate template. Launching process: java.
... nothing happened here for more than 20 minutes since I ran it.
MyTemplate Sample By Events including Cycles (FIXED_CYCLES), INST_ALL and L1I_CACHE_MISS_DEMAND.
I have sent feedback: https://feedbackassistant.apple.com/feedback/12912584
Thanks,
Leslie Zhai