Skip to content

Commit bbd500f

Browse files
committed
8280593: [PPC64, S390] redundant allocation of MacroAssembler in StubGenerator ctor
Backport-of: c936e7059b848d0e0be5f3234c4367657f2af2a7
1 parent 230cd5e commit bbd500f

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

src/hotspot/cpu/ppc/stubGenerator_ppc.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 1997, 2021, Oracle and/or its affiliates. All rights reserved.
3-
* Copyright (c) 2012, 2021 SAP SE. All rights reserved.
2+
* Copyright (c) 1997, 2022, Oracle and/or its affiliates. All rights reserved.
3+
* Copyright (c) 2012, 2022 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* This code is free software; you can redistribute it and/or modify it
@@ -4616,8 +4616,6 @@ class StubGenerator: public StubCodeGenerator {
46164616

46174617
public:
46184618
StubGenerator(CodeBuffer* code, bool all) : StubCodeGenerator(code) {
4619-
// replace the standard masm with a special one:
4620-
_masm = new MacroAssembler(code);
46214619
if (all) {
46224620
generate_all();
46234621
} else {

src/hotspot/cpu/s390/stubGenerator_s390.cpp

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
2-
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
3-
* Copyright (c) 2016, 2019 SAP SE. All rights reserved.
2+
* Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
3+
* Copyright (c) 2016, 2022 SAP SE. All rights reserved.
44
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
55
*
66
* This code is free software; you can redistribute it and/or modify it
@@ -2404,9 +2404,6 @@ class StubGenerator: public StubCodeGenerator {
24042404

24052405
public:
24062406
StubGenerator(CodeBuffer* code, bool all) : StubCodeGenerator(code) {
2407-
// Replace the standard masm with a special one:
2408-
_masm = new MacroAssembler(code);
2409-
24102407
_stub_count = !all ? 0x100 : 0x200;
24112408
if (all) {
24122409
generate_all();

src/hotspot/share/runtime/stubCodeGenerator.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void StubCodeDesc::print() const { print_on(tty); }
6969
// Implementation of StubCodeGenerator
7070

7171
StubCodeGenerator::StubCodeGenerator(CodeBuffer* code, bool print_code) {
72-
_masm = new MacroAssembler(code );
72+
_masm = new MacroAssembler(code);
7373
_print_code = PrintStubCode || print_code;
7474
}
7575

0 commit comments

Comments
 (0)