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