8087333: Optionally Pre-Generate the HotSpot Template Interpreter

Optional support for pregenerated template interpreter

Reviewed-by: coleenp, dholmes, kvn
This commit is contained in:
Bertrand Delsart 2015-07-01 10:53:26 +02:00
parent a7f0956201
commit 5aec2dc9fc
39 changed files with 716 additions and 257 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2015, 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
@ -261,3 +261,17 @@ void StubQueue::print() {
stub_print(s);
}
}
// Fixup for pregenerated code
void StubQueue::fix_buffer(address buffer, address queue_end, address buffer_end, int number_of_stubs) {
const int extra_bytes = CodeEntryAlignment;
_stub_buffer = buffer;
_queue_begin = 0;
_queue_end = queue_end - buffer;
_number_of_stubs = number_of_stubs;
int size = buffer_end - buffer;
// Note: _buffer_limit must differ from _queue_end in the iteration loops
// => add extra space at the end (preserving alignment for asserts) if needed
if (buffer_end == queue_end) size += extra_bytes;
_buffer_limit = _buffer_size = size;
}