Skip to content

Commit c936e70

Browse files
committed
8280593: [PPC64, S390] redundant allocation of MacroAssembler in StubGenerator ctor
Reviewed-by: mdoerr, lucy
1 parent 63e11cf commit c936e70

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
@@ -4656,8 +4656,6 @@ class StubGenerator: public StubCodeGenerator {
46564656

46574657
public:
46584658
StubGenerator(CodeBuffer* code, bool all) : StubCodeGenerator(code) {
4659-
// replace the standard masm with a special one:
4660-
_masm = new MacroAssembler(code);
46614659
if (all) {
46624660
generate_all();
46634661
} 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)