Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8264359: Compiler directives should enable DebugNonSafepoints when PrintAssembly is requested #3316

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/hotspot/share/compiler/compilerDirectives.cpp
Expand Up @@ -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);
Expand Down Expand Up @@ -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.
Expand Down
3 changes: 0 additions & 3 deletions src/hotspot/share/compiler/compilerOracle.cpp
Expand Up @@ -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;
}
}
}
Expand Down