HotSpot Virtual Machine 翻译 2 Compiler Control

心已赠人 2022-04-17 04:36 298阅读 0赞

Compiler Control provides a way to control Java Virtual Machine (JVM) compilation through compiler directive options. The level of control is runtime-manageable and method specific.

编译器控制通过编译器指令选项提供了一种方式来控制Java虚拟机的编译。控制级别是运行时管理的并且是特定于方法的。

A compiler directive is an instruction that tells the JVM how compilation should occur. A directive provides method-context precision in controlling the compilation process. You can use directives to write small, contained, JVM compiler tests that can run without restarting the entire JVM. You can also use directives to create workarounds for bugs, in the JVM compilers.

一条编译器指令就是一条命令,告诉JVM编译应该如何发生。指令在控制编译过程中提供了方法上下文精确度。你可以使用指令来写小的,被包含的,JVM编译器测试,它们可以无需重启整个JVM而运行。你也可以在JVM编译器中使用指令来创建 bug 变通方法。

You can specify a file that contains compiler directives when you start a program through the command line. You can also add or remove directives from an already running program by using diagnostic commands.

当你通过命令行启动一个程序的时候,你可以指定一个包含编译器指令的文件。你也可以使用诊断命令从一个已经运行的程序中添加或者移除指令。

Compiler Control supersedes and is backward compatible with CompileCommand.

编译器控制可以使用编译命令代替和向后兼容。

Topics:

  • Writing Directives

    • Writing a Directive File
    • Writing a Compiler Directive
    • Writing a Method Pattern in a Compiler Directive
    • Writing an Inline Directive Option
    • Preventing Duplication with the Enable Option
  • Understanding Directives

    • What Is the Default Directive?
    • How Directives are Applied to Code?
    • Compiler Control and Backward Compatibility
  • Commands for Working with Directive Files

    • Compiler Directives and the Command Line
    • Compiler Directives and Diagnostic Commands
    • How Directives Are Ordered in the Directives Stack?

来自 [https://docs.oracle.com/javase/10/vm/compiler-control1.htm\#JSJVM-GUID-94AD8194-786A-4F19-BFFF-278F8E237F3A][https_docs.oracle.com_javase_10_vm_compiler-control1.htm_JSJVM-GUID-94AD8194-786A-4F19-BFFF-278F8E237F3A]

发表评论

表情:
评论列表 (有 0 条评论,298人围观)

还没有评论,来说两句吧...

相关阅读