【问题标题】:Is there any way to redirect the output of native JVM output like -XX:+PrintCompilation有什么方法可以重定向本机 JVM 输出的输出,例如 -XX:+PrintCompilation
【发布时间】:2013-01-15 20:57:58
【问题描述】:

一些热点 JVM 标志,例如 -XX:+PrintCompilation,会导致输出出现在 stdout 或 stderr 上。与 GC 相关的输出,例如由 -verbose:gc 启用的输出,可以使用 -Xloggc:<path> 重定向,但我找不到任何方法来重定向其他本机输出,除了重定向整个过程(这可能肯定是不可取的原因,例如还捕获所有 System.out 输出)。

【问题讨论】:

    标签: java debugging jvm-hotspot sun


    【解决方案1】:

    +PrintCompilation 使用print_on(tty, message),从openjdk source可以看出,直接打印到tty,所以我认为重定向整个过程输出是你唯一的选择,而不需要重新编译编译器。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-04-29
      • 2021-07-06
      • 2022-11-02
      • 2015-06-25
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多