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

Reviewed-by: mdoerr, lucy
  • Loading branch information
reinrich committed Feb 4, 2022
1 parent 63e11cf commit c936e70
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 @@ -4656,8 +4656,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

3 comments on commit c936e70

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@reinrich
Copy link
Member Author

Choose a reason for hiding this comment

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

/backport jdk17u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on c936e70 Apr 29, 2022

Choose a reason for hiding this comment

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

@reinrich the backport was successfully created on the branch reinrich-backport-c936e705 in my personal fork of openjdk/jdk17u-dev. To create a pull request with this backport targeting openjdk/jdk17u-dev:master, just click the following link:

➡️ Create pull request

The title of the pull request is automatically filled in correctly and below you find a suggestion for the pull request body:

Hi all,

This pull request contains a backport of commit c936e705 from the openjdk/jdk repository.

The commit being backported was authored by Richard Reingruber on 4 Feb 2022 and was reviewed by Martin Doerr and Lutz Schmidt.

Thanks!

If you need to update the source branch of the pull then run the following commands in a local clone of your personal fork of openjdk/jdk17u-dev:

$ git fetch https://github.com/openjdk-bots/jdk17u-dev reinrich-backport-c936e705:reinrich-backport-c936e705
$ git checkout reinrich-backport-c936e705
# make changes
$ git add paths/to/changed/files
$ git commit --message 'Describe additional changes made'
$ git push https://github.com/openjdk-bots/jdk17u-dev reinrich-backport-c936e705

Please sign in to comment.