Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
8261661: gc/stress/TestReclaimStringsLeaksMemory.java fails because R…
…eserved memory size is too big

Co-authored-by: Albert Mingkun Yang <ayang@openjdk.org>
Reviewed-by: ayang, kbarrett
  • Loading branch information
Daniel D. Daugherty and albertnetymk committed Feb 12, 2021
1 parent e29c560 commit 735757f
Showing 1 changed file with 4 additions and 4 deletions.
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2018, 2021, Oracle and/or its affiliates. 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 @@ -48,9 +48,9 @@

public class TestReclaimStringsLeaksMemory {

// The amount of memory in kB reserved in the "Symbol" category that indicates a memory leak for
// The amount of memory in B reserved in the "Symbol" category that indicates a memory leak for
// this test.
public static final int ReservedThreshold = 70000;
public static final int ReservedThreshold = 70000000;

public static void main(String[] args) throws Exception {
ArrayList<String> baseargs = new ArrayList<>(Arrays.asList("-Xms256M",
Expand All @@ -77,7 +77,7 @@ private static void verifySymbolMemoryUsageNotTooHigh(OutputAnalyzer output) thr
}

int reserved = Integer.parseInt(m.group(1));
Asserts.assertLT(reserved, ReservedThreshold, "Reserved memory size is " + reserved + "KB which is greater than or equal to " + ReservedThreshold + "KB indicating a memory leak");
Asserts.assertLT(reserved, ReservedThreshold, "Reserved memory size is " + reserved + "B which is greater than or equal to " + ReservedThreshold + "B indicating a memory leak");

output.shouldHaveExitValue(0);
}
Expand Down

3 comments on commit 735757f

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

@tstuefe
Copy link
Member

Choose a reason for hiding this comment

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

/backport jdk11u-dev

@openjdk
Copy link

@openjdk openjdk bot commented on 735757f Nov 29, 2021

Choose a reason for hiding this comment

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

@tstuefe Could not automatically backport 735757f1 to openjdk/jdk11u-dev due to conflicts in the following files:

  • test/hotspot/jtreg/gc/stress/TestReclaimStringsLeaksMemory.java

To manually resolve these conflicts run the following commands in your personal fork of openjdk/jdk11u-dev:

$ git checkout -b tstuefe-backport-735757f1
$ git fetch --no-tags https://git.openjdk.java.net/jdk 735757f1e0ec9d05eb4c6f4d680b34de96f83700
$ git cherry-pick --no-commit 735757f1e0ec9d05eb4c6f4d680b34de96f83700
$ # Resolve conflicts
$ git add files/with/resolved/conflicts
$ git commit -m 'Backport 735757f1e0ec9d05eb4c6f4d680b34de96f83700'

Once you have resolved the conflicts as explained above continue with creating a pull request towards the openjdk/jdk11u-dev with the title Backport 735757f1e0ec9d05eb4c6f4d680b34de96f83700.

Please sign in to comment.