Skip to content
Permalink
Browse files
8264223: CodeHeap::verify fails extra_hops assertion in fastdebug test
Reviewed-by: lucy, shade
  • Loading branch information
Hui Shi authored and RealLucy committed Apr 1, 2021
1 parent 0696fd0 commit 011f6d13ab306581f595d6743ca0ff6dfbf95932
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
@@ -835,7 +835,10 @@ void CodeHeap::verify() {
}
}
assert(nseg == _next_segment, "CodeHeap: segment count mismatch. found %d, expected %d.", (int)nseg, (int)_next_segment);
assert((count == 0) || (extra_hops < (16 + 2*count)), "CodeHeap: many extra hops due to optimization. blocks: %d, extra hops: %d.", count, extra_hops);
assert(extra_hops <= _fragmentation_count, "CodeHeap: extra hops wrong. fragmentation: %d, extra hops: %d.", _fragmentation_count, extra_hops);
if (extra_hops >= (16 + 2 * count)) {
warning("CodeHeap: many extra hops due to optimization. blocks: %d, extra hops: %d.", count, extra_hops);
}

// Verify that the number of free blocks is not out of hand.
static int free_block_threshold = 10000;
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 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
@@ -29,6 +29,14 @@
* @run main/othervm -Xcomp compiler.codegen.Test6935535
*/

/**
* @test
* @bug 8264223
* @summary add CodeHeap verification
*
* @requires vm.debug
* @run main/othervm -Xcomp -XX:+VerifyCodeCache compiler.codegen.Test6935535
*/
package compiler.codegen;

public class Test6935535 {

1 comment on commit 011f6d1

@openjdk-notifier
Copy link

@openjdk-notifier openjdk-notifier bot commented on 011f6d1 Apr 1, 2021

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.