RFR: Fallback xctrace profiler resolution on SDKROOT env variable

Galder Zamarreño galder at openjdk.org
Tue Apr 8 16:38:34 UTC 2025


On Tue, 1 Apr 2025 19:33:02 GMT, Filipp Zhinkin <fzhinkin at openjdk.org> wrote:

>> If `xctrace` cannot be found via `xcode-select` it checks the SDKROOT environment variable.
>> 
>> @fzhinkin Can you have a look?
>
> @galderz, I'm not an expert in Xcode-related topics, but it seems like `SDKROOT` is meant to point to a directory containing headers and libraries for a particular platform (so it should be synonymous to `xcrun --show-sdk-path`, which returns `/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk` for me), rather than a root directory with tools like `xctrace`.
> 
> Could you please elaborate scenarios where `xctrace-select` can't locate `xctrace`, but `SDKROOT` points to a proper directory? There's also a [DEVELOPER_DIR](https://keith.github.io/xcode-man-pages/xcode-select.1.html#ENVIRONMENT) env variable, which allows temporary overriding the directory used by `xcode-select`. Perhaps, it'll be better to rely on its value to locate `xctrace`?

Closing. Indeed setting `DEVELOPER_DIR` environment variable is enough for `xcode-select` to pick it up. So, nothing to add to jmh. Thanks @fzhinkin

-------------

PR Comment: https://git.openjdk.org/jmh/pull/155#issuecomment-2787042921


More information about the jmh-dev mailing list