Skip to content
Permalink
Browse files

8264359: Compiler directives should enable DebugNonSafepoints when Pr…

…intAssembly is requested

Reviewed-by: kvn, thartmann
  • Loading branch information
Nils Eliasson committed Apr 6, 2021
1 parent ec7b002 commit 81325483d8ef95a597349e18dc8413eeb8a45008
@@ -30,6 +30,7 @@
#include "compiler/compilerOracle.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "runtime/globals_extension.hpp"

CompilerDirectives::CompilerDirectives() : _next(NULL), _match(NULL), _ref_count(0) {
_c1_store = new DirectiveSet(this);
@@ -104,6 +105,10 @@ void DirectiveSet::finalize(outputStream* st) {
if (LogOption && !LogCompilation) {
st->print_cr("Warning: +LogCompilation must be set to enable compilation logging from directives");
}
if (PrintAssemblyOption && FLAG_IS_DEFAULT(DebugNonSafepoints)) {
warning("printing of assembly code is enabled; turning on DebugNonSafepoints to gain additional output");
DebugNonSafepoints = true;
}

// if any flag has been modified - set directive as enabled
// unless it already has been explicitly set.
@@ -911,9 +911,6 @@ void compilerOracle_init() {
if (has_command(CompileCommand::Print)) {
if (PrintAssembly) {
warning("CompileCommand and/or %s file contains 'print' commands, but PrintAssembly is also enabled", default_cc_file);
} else if (FLAG_IS_DEFAULT(DebugNonSafepoints)) {
warning("printing of assembly code is enabled; turning on DebugNonSafepoints to gain additional output");
DebugNonSafepoints = true;
}
}
}

1 comment on commit 8132548

@openjdk-notifier

This comment has been minimized.

Copy link

@openjdk-notifier openjdk-notifier bot commented on 8132548 Apr 6, 2021

Please sign in to comment.