equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
49 #include "runtime/vmThread.hpp" |
49 #include "runtime/vmThread.hpp" |
50 #include "runtime/vm_operations.hpp" |
50 #include "runtime/vm_operations.hpp" |
51 #include "services/serviceUtil.hpp" |
51 #include "services/serviceUtil.hpp" |
52 #include "utilities/macros.hpp" |
52 #include "utilities/macros.hpp" |
53 #if INCLUDE_ALL_GCS |
53 #if INCLUDE_ALL_GCS |
|
54 #include "gc/g1/g1SATBCardTableModRefBS.hpp" |
54 #include "gc/parallel/parallelScavengeHeap.hpp" |
55 #include "gc/parallel/parallelScavengeHeap.hpp" |
55 #endif // INCLUDE_ALL_GCS |
56 #endif // INCLUDE_ALL_GCS |
56 |
57 |
57 // JvmtiTagHashmapEntry |
58 // JvmtiTagHashmapEntry |
58 // |
59 // |
1532 void do_entry(JvmtiTagHashmapEntry* entry) { |
1533 void do_entry(JvmtiTagHashmapEntry* entry) { |
1533 for (int i=0; i<_tag_count; i++) { |
1534 for (int i=0; i<_tag_count; i++) { |
1534 if (_tags[i] == entry->tag()) { |
1535 if (_tags[i] == entry->tag()) { |
1535 oop o = entry->object(); |
1536 oop o = entry->object(); |
1536 assert(o != NULL && Universe::heap()->is_in_reserved(o), "sanity check"); |
1537 assert(o != NULL && Universe::heap()->is_in_reserved(o), "sanity check"); |
|
1538 #if INCLUDE_ALL_GCS |
|
1539 if (UseG1GC) { |
|
1540 // The reference in this tag map could be the only (implicitly weak) |
|
1541 // reference to that object. If we hand it out, we need to keep it live wrt |
|
1542 // SATB marking similar to other j.l.ref.Reference referents. |
|
1543 G1SATBCardTableModRefBS::enqueue(o); |
|
1544 } |
|
1545 #endif |
1537 jobject ref = JNIHandles::make_local(JavaThread::current(), o); |
1546 jobject ref = JNIHandles::make_local(JavaThread::current(), o); |
1538 _object_results->append(ref); |
1547 _object_results->append(ref); |
1539 _tag_results->append((uint64_t)entry->tag()); |
1548 _tag_results->append((uint64_t)entry->tag()); |
1540 } |
1549 } |
1541 } |
1550 } |