Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8280593: [PPC64, S390] redundant allocation of MacroAssembler in Stub…
…Generator ctor

Backport-of: c936e7059b848d0e0be5f3234c4367657f2af2a7
  • Loading branch information
reinrich committed May 12, 2022
1 parent 230cd5e commit bbd500f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
6 changes: 2 additions & 4 deletions src/hotspot/cpu/ppc/stubGenerator_ppc.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2021 SAP SE. All rights reserved.
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -4616,8 +4616,6 @@ class StubGenerator: public StubCodeGenerator {

public:
StubGenerator(CodeBuffer* code, bool all) : StubCodeGenerator(code) {
// replace the standard masm with a special one:
_masm = new MacroAssembler(code);
if (all) {
generate_all();
} else {
Expand Down
7 changes: 2 additions & 5 deletions src/hotspot/cpu/s390/stubGenerator_s390.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2019 SAP SE. All rights reserved.
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2016, 2022 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -2404,9 +2404,6 @@ class StubGenerator: public StubCodeGenerator {

public:
StubGenerator(CodeBuffer* code, bool all) : StubCodeGenerator(code) {
// Replace the standard masm with a special one:
_masm = new MacroAssembler(code);

_stub_count = !all ? 0x100 : 0x200;
if (all) {
generate_all();
Expand Down
2 changes: 1 addition & 1 deletion src/hotspot/share/runtime/stubCodeGenerator.cpp
Expand Up @@ -69,7 +69,7 @@ void StubCodeDesc::print() const { print_on(tty); }
// Implementation of StubCodeGenerator

StubCodeGenerator::StubCodeGenerator(CodeBuffer* code, bool print_code) {
_masm = new MacroAssembler(code );
_masm = new MacroAssembler(code);
_print_code = PrintStubCode || print_code;
}

Expand Down

1 comment on commit bbd500f

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.