From galder at openjdk.org Tue Apr 1 08:10:46 2025 From: galder at openjdk.org (Galder =?UTF-8?B?WmFtYXJyZcOxbw==?=) Date: Tue, 1 Apr 2025 08:10:46 GMT Subject: RFR: 7903982: JMH: Fallback xctrace profiler resolution on SDKROOT env variable Message-ID: If `xctrace` cannot be found via `xcode-select` it checks the SDKROOT environment variable. @fzhinkin Can you have a look? ------------- Commit messages: - 7903982: JMH: Fallback xctrace resolution on SDKROOT Changes: https://git.openjdk.org/jmh/pull/155/files Webrev: https://webrevs.openjdk.org/?repo=jmh&pr=155&range=00 Issue: https://bugs.openjdk.org/browse/CODETOOLS-7903982 Stats: 24 lines in 1 file changed: 18 ins; 4 del; 2 mod Patch: https://git.openjdk.org/jmh/pull/155.diff Fetch: git fetch https://git.openjdk.org/jmh.git pull/155/head:pull/155 PR: https://git.openjdk.org/jmh/pull/155 From fzhinkin at openjdk.org Tue Apr 1 19:35:28 2025 From: fzhinkin at openjdk.org (Filipp Zhinkin) Date: Tue, 1 Apr 2025 19:35:28 GMT Subject: RFR: Fallback xctrace profiler resolution on SDKROOT env variable In-Reply-To: References: Message-ID: On Tue, 1 Apr 2025 08:06:18 GMT, Galder Zamarre?o 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`? ------------- PR Comment: https://git.openjdk.org/jmh/pull/155#issuecomment-2770490934 From galder at openjdk.org Wed Apr 2 10:16:30 2025 From: galder at openjdk.org (Galder =?UTF-8?B?WmFtYXJyZcOxbw==?=) Date: Wed, 2 Apr 2025 10:16:30 GMT Subject: RFR: Fallback xctrace profiler resolution on SDKROOT env variable In-Reply-To: References: Message-ID: <65pZ0QciAAaF7By6S8r9QrIbZHPCsIwWt50D8RNaAes=.db06d5bb-49a8-401d-baac-956749ae4007@github.com> On Tue, 1 Apr 2025 19:33:02 GMT, Filipp Zhinkin 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`? @fzhinkin Thanks for feedback. `DEVELOPER_DIR` is the correct env variable for this use case. I'll fix the PR ------------- PR Comment: https://git.openjdk.org/jmh/pull/155#issuecomment-2772095909 From galder at openjdk.org Wed Apr 2 10:16:30 2025 From: galder at openjdk.org (Galder =?UTF-8?B?WmFtYXJyZcOxbw==?=) Date: Wed, 2 Apr 2025 10:16:30 GMT Subject: RFR: Fallback xctrace profiler resolution on SDKROOT env variable In-Reply-To: References: Message-ID: On Tue, 1 Apr 2025 08:06:18 GMT, Galder Zamarre?o wrote: > If `xctrace` cannot be found via `xcode-select` it checks the SDKROOT environment variable. > > @fzhinkin Can you have a look? In fact, I might not need to fix JMH if `xcode-select` picks that up. I'll give that a go first ------------- PR Comment: https://git.openjdk.org/jmh/pull/155#issuecomment-2772098056 From galder at openjdk.org Tue Apr 8 16:38:34 2025 From: galder at openjdk.org (Galder =?UTF-8?B?WmFtYXJyZcOxbw==?=) Date: Tue, 8 Apr 2025 16:38:34 GMT Subject: RFR: Fallback xctrace profiler resolution on SDKROOT env variable In-Reply-To: References: Message-ID: <-g6ug6ALa-RE8FrGs2tt9w7gsPZMc_LnJGNkoU28Bnc=.88873295-a3f3-4f50-9fed-1a950376eec2@github.com> On Tue, 1 Apr 2025 19:33:02 GMT, Filipp Zhinkin 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 From galder at openjdk.org Tue Apr 8 16:38:34 2025 From: galder at openjdk.org (Galder =?UTF-8?B?WmFtYXJyZcOxbw==?=) Date: Tue, 8 Apr 2025 16:38:34 GMT Subject: Withdrawn: Fallback xctrace profiler resolution on SDKROOT env variable In-Reply-To: References: Message-ID: On Tue, 1 Apr 2025 08:06:18 GMT, Galder Zamarre?o wrote: > If `xctrace` cannot be found via `xcode-select` it checks the SDKROOT environment variable. > > @fzhinkin Can you have a look? This pull request has been closed without being integrated. ------------- PR: https://git.openjdk.org/jmh/pull/155