6 * published by the Free Software Foundation.
7 *
8 * This code is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * version 2 for more details (a copy is included in the LICENSE file that
12 * accompanied this code).
13 *
14 * You should have received a copy of the GNU General Public License version
15 * 2 along with this work; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19 * or visit www.oracle.com if you need additional information or have any
20 * questions.
21 *
22 */
23
24 #include "precompiled.hpp"
25 #include "code/dependencyContext.hpp"
26 #include "unittest.hpp"
27
28 class TestDependencyContext {
29 public:
30 char* _buffer[sizeof(nmethod) * 3];
31 nmethod* _nmethods[3];
32
33 nmethodBucket* volatile _dependency_context;
34 volatile uint64_t _last_cleanup;
35
36 DependencyContext dependencies() {
37 DependencyContext depContext(&_dependency_context, &_last_cleanup);
38 return depContext;
39 }
40
41 TestDependencyContext()
42 : _dependency_context(NULL),
43 _last_cleanup(0) {
44 CodeCache_lock->lock_without_safepoint_check();
|
6 * published by the Free Software Foundation.
7 *
8 * This code is distributed in the hope that it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
11 * version 2 for more details (a copy is included in the LICENSE file that
12 * accompanied this code).
13 *
14 * You should have received a copy of the GNU General Public License version
15 * 2 along with this work; if not, write to the Free Software Foundation,
16 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
17 *
18 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
19 * or visit www.oracle.com if you need additional information or have any
20 * questions.
21 *
22 */
23
24 #include "precompiled.hpp"
25 #include "code/dependencyContext.hpp"
26 #include "code/nmethod.hpp"
27 #include "unittest.hpp"
28
29 class TestDependencyContext {
30 public:
31 char* _buffer[sizeof(nmethod) * 3];
32 nmethod* _nmethods[3];
33
34 nmethodBucket* volatile _dependency_context;
35 volatile uint64_t _last_cleanup;
36
37 DependencyContext dependencies() {
38 DependencyContext depContext(&_dependency_context, &_last_cleanup);
39 return depContext;
40 }
41
42 TestDependencyContext()
43 : _dependency_context(NULL),
44 _last_cleanup(0) {
45 CodeCache_lock->lock_without_safepoint_check();
|