--- a/hotspot/src/share/vm/runtime/jniHandles.hpp Wed Jun 11 09:58:23 2014 -0400
+++ b/hotspot/src/share/vm/runtime/jniHandles.hpp Wed Jun 11 18:34:09 2014 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, 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
@@ -112,6 +112,9 @@
oop* _free_list; // Handle free list
int _allocate_before_rebuild; // Number of blocks to allocate before rebuilding free list
+ // Check JNI, "planned capacity" for current frame (or push/ensure)
+ size_t _planned_capacity;
+
#ifndef PRODUCT
JNIHandleBlock* _block_list_link; // Link for list below
static JNIHandleBlock* _block_list; // List of all allocated blocks (for debugging only)
@@ -152,6 +155,11 @@
// Traversal of weak handles. Unreachable oops are cleared.
void weak_oops_do(BoolObjectClosure* is_alive, OopClosure* f);
+ // Checked JNI support
+ void set_planned_capacity(size_t planned_capacity) { _planned_capacity = planned_capacity; }
+ const size_t get_planned_capacity() { return _planned_capacity; }
+ const size_t get_number_of_live_handles();
+
// Debugging
bool chain_contains(jobject handle) const; // Does this block or following blocks contain handle
bool contains(jobject handle) const; // Does this block contain handle