RFR: 8304089: Convert TraceDependencies to UL [v3]

Coleen Phillimore coleenp at openjdk.org
Thu Mar 16 13:19:21 UTC 2023


On Thu, 16 Mar 2023 07:13:16 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> No, this is the right thing to do.  If -Xlog:dependency - the compiler group also expects the dependency printed to the compiler log file.  The logging is a separate mechanism, but should be enabled with -Xlog:dependency.
>
> Sorry I don't follow that. `use_vm_log()` only affects non-product builds and forces `LogVMOutput` to true. That in turn will cause `defaultStream::init_log()` to execute which initializes the log file etc. But I don't see how that would cause UL logging for "dependencies" to also get written to the log file???

See the function log_dependency()

https://github.com/openjdk/jdk/blob/421b4ee33c652cc7c444fbbf298bbc23d052c2fe/src/hotspot/share/code/dependencies.cpp#L845

called from here (as one place).

https://github.com/openjdk/jdk/blob/421b4ee33c652cc7c444fbbf298bbc23d052c2fe/src/hotspot/share/code/dependencies.cpp#L2071

When TraceDependencies was true, the log file would be non-null and log_dependency would write to it.  Keeping this with -Xlog:dependencies=debug retains what TraceDependencies did.

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

PR: https://git.openjdk.org/jdk/pull/13007


More information about the hotspot-dev mailing list