8237512: AArch64: aarch64TestHook leaks a BufferBlob
Reviewed-by: adinn, aph
This commit is contained in:
parent
a768bfdf4d
commit
b21e04af5d
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* Copyright (c) 2014, 2020, Red Hat Inc. 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
|
||||
@ -32,10 +32,12 @@
|
||||
|
||||
extern "C" void entry(CodeBuffer*);
|
||||
|
||||
#ifdef ASSERT
|
||||
void aarch64TestHook()
|
||||
{
|
||||
BufferBlob* b = BufferBlob::create("aarch64Test", 500000);
|
||||
CodeBuffer code(b);
|
||||
MacroAssembler _masm(&code);
|
||||
entry(&code);
|
||||
BufferBlob::free(b);
|
||||
}
|
||||
#endif
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2020 Red Hat Inc. 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
|
||||
@ -73,7 +73,6 @@ static void asm_check(const unsigned int *insns, const unsigned int *insns1, siz
|
||||
}
|
||||
assert(ok, "Assembler smoke test failed");
|
||||
}
|
||||
#endif // ASSERT
|
||||
|
||||
void entry(CodeBuffer *cb) {
|
||||
|
||||
@ -91,7 +90,6 @@ void entry(CodeBuffer *cb) {
|
||||
|
||||
// Smoke test for assembler
|
||||
|
||||
#ifdef ASSERT
|
||||
// BEGIN Generated code -- do not edit
|
||||
// Generated by aarch64-asmtest.py
|
||||
Label back, forth;
|
||||
@ -1459,9 +1457,8 @@ Disassembly of section .text:
|
||||
asm_check((unsigned int *)PC, vector_insns,
|
||||
sizeof vector_insns / sizeof vector_insns[0]);
|
||||
}
|
||||
|
||||
#endif // ASSERT
|
||||
}
|
||||
#endif // ASSERT
|
||||
|
||||
#undef __
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, Red Hat Inc. All rights reserved.
|
||||
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2020 Red Hat Inc. 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
|
||||
@ -24,7 +24,6 @@
|
||||
*/
|
||||
|
||||
#include "precompiled.hpp"
|
||||
#include "asm/macroAssembler.hpp"
|
||||
#include "runtime/icache.hpp"
|
||||
|
||||
extern void aarch64TestHook();
|
||||
@ -36,5 +35,7 @@ void ICacheStubGenerator::generate_icache_flush(
|
||||
}
|
||||
|
||||
void ICache::initialize() {
|
||||
#ifdef ASSERT
|
||||
aarch64TestHook();
|
||||
#endif
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user