src/hotspot/share/gc/epsilon/epsilonHeap.hpp
author zgu
Wed, 11 Jul 2018 13:55:38 -0400
changeset 51042 f378705346bf
parent 50523 7b7c75d87f9b
child 53244 9807daeb47c4
permissions -rw-r--r--
8207056: Epsilon GC to support object pinning Summary: Epsilon GC to use object pinning to avoid expensive GCLocker Reviewed-by: shade, rkennke
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
50523
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     1
/*
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     2
 * Copyright (c) 2017, 2018, Red Hat, Inc. All rights reserved.
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     3
 *
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     6
 * published by the Free Software Foundation.
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     7
 *
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     8
 * This code is distributed in the hope that it will be useful, but WITHOUT
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
     9
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    10
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    11
 * version 2 for more details (a copy is included in the LICENSE file that
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    12
 * accompanied this code).
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    13
 *
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License version
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    15
 * 2 along with this work; if not, write to the Free Software Foundation,
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    16
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    17
 *
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    18
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    19
 * or visit www.oracle.com if you need additional information or have any
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    20
 * questions.
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    21
 *
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    22
 */
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    23
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    24
#ifndef SHARE_VM_GC_EPSILON_COLLECTEDHEAP_HPP
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    25
#define SHARE_VM_GC_EPSILON_COLLECTEDHEAP_HPP
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    26
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    27
#include "gc/shared/collectedHeap.hpp"
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    28
#include "gc/shared/softRefPolicy.hpp"
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    29
#include "gc/shared/space.hpp"
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    30
#include "services/memoryManager.hpp"
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    31
#include "gc/epsilon/epsilonCollectorPolicy.hpp"
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    32
#include "gc/epsilon/epsilonMonitoringSupport.hpp"
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    33
#include "gc/epsilon/epsilonBarrierSet.hpp"
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    34
#include "gc/epsilon/epsilon_globals.hpp"
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    35
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    36
class EpsilonHeap : public CollectedHeap {
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    37
  friend class VMStructs;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    38
private:
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    39
  EpsilonCollectorPolicy* _policy;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    40
  SoftRefPolicy _soft_ref_policy;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    41
  EpsilonMonitoringSupport* _monitoring_support;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    42
  MemoryPool* _pool;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    43
  GCMemoryManager _memory_manager;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    44
  ContiguousSpace* _space;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    45
  VirtualSpace _virtual_space;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    46
  size_t _max_tlab_size;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    47
  size_t _step_counter_update;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    48
  size_t _step_heap_print;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    49
  int64_t _decay_time_ns;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    50
  volatile size_t _last_counter_update;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    51
  volatile size_t _last_heap_print;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    52
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    53
public:
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    54
  static EpsilonHeap* heap();
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    55
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    56
  EpsilonHeap(EpsilonCollectorPolicy* p) :
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    57
          _policy(p),
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    58
          _memory_manager("Epsilon Heap", "") {};
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    59
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    60
  virtual Name kind() const {
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    61
    return CollectedHeap::Epsilon;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    62
  }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    63
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    64
  virtual const char* name() const {
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    65
    return "Epsilon";
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    66
  }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    67
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    68
  virtual CollectorPolicy* collector_policy() const {
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    69
    return _policy;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    70
  }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    71
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    72
  virtual SoftRefPolicy* soft_ref_policy() {
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    73
    return &_soft_ref_policy;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    74
  }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    75
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    76
  virtual jint initialize();
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    77
  virtual void post_initialize();
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    78
  virtual void initialize_serviceability();
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    79
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    80
  virtual GrowableArray<GCMemoryManager*> memory_managers();
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    81
  virtual GrowableArray<MemoryPool*> memory_pools();
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    82
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    83
  virtual size_t max_capacity() const { return _virtual_space.reserved_size();  }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    84
  virtual size_t capacity()     const { return _virtual_space.committed_size(); }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    85
  virtual size_t used()         const { return _space->used(); }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    86
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    87
  virtual bool is_in(const void* p) const {
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    88
    return _space->is_in(p);
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    89
  }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    90
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    91
  virtual bool is_scavengable(oop obj) {
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    92
    // No GC is going to happen, therefore no objects ever move.
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    93
    return false;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    94
  }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    95
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    96
  virtual bool is_maximal_no_gc() const {
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    97
    // No GC is going to happen. Return "we are at max", when we are about to fail.
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    98
    return used() == capacity();
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
    99
  }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   100
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   101
  // Allocation
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   102
  HeapWord* allocate_work(size_t size);
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   103
  virtual HeapWord* mem_allocate(size_t size, bool* gc_overhead_limit_was_exceeded);
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   104
  virtual HeapWord* allocate_new_tlab(size_t min_size,
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   105
                                      size_t requested_size,
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   106
                                      size_t* actual_size);
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   107
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   108
  // TLAB allocation
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   109
  virtual bool supports_tlab_allocation()           const { return true;           }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   110
  virtual size_t tlab_capacity(Thread* thr)         const { return capacity();     }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   111
  virtual size_t tlab_used(Thread* thr)             const { return used();         }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   112
  virtual size_t max_tlab_size()                    const { return _max_tlab_size; }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   113
  virtual size_t unsafe_max_tlab_alloc(Thread* thr) const;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   114
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   115
  virtual void collect(GCCause::Cause cause);
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   116
  virtual void do_full_collection(bool clear_all_soft_refs);
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   117
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   118
  // Heap walking support
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   119
  virtual void safe_object_iterate(ObjectClosure* cl);
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   120
  virtual void object_iterate(ObjectClosure* cl) {
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   121
    safe_object_iterate(cl);
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   122
  }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   123
51042
f378705346bf 8207056: Epsilon GC to support object pinning
zgu
parents: 50523
diff changeset
   124
  // Object pinning support: every object is implicitly pinned
f378705346bf 8207056: Epsilon GC to support object pinning
zgu
parents: 50523
diff changeset
   125
  virtual bool supports_object_pinning() const           { return true; }
f378705346bf 8207056: Epsilon GC to support object pinning
zgu
parents: 50523
diff changeset
   126
  virtual oop pin_object(JavaThread* thread, oop obj)    { return obj; }
f378705346bf 8207056: Epsilon GC to support object pinning
zgu
parents: 50523
diff changeset
   127
  virtual void unpin_object(JavaThread* thread, oop obj) { }
f378705346bf 8207056: Epsilon GC to support object pinning
zgu
parents: 50523
diff changeset
   128
50523
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   129
  // No support for block parsing.
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   130
  virtual HeapWord* block_start(const void* addr) const { return NULL;  }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   131
  virtual size_t block_size(const HeapWord* addr) const { return 0;     }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   132
  virtual bool block_is_obj(const HeapWord* addr) const { return false; }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   133
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   134
  // No GC threads
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   135
  virtual void print_gc_threads_on(outputStream* st) const {}
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   136
  virtual void gc_threads_do(ThreadClosure* tc) const {}
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   137
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   138
  // No heap verification
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   139
  virtual void prepare_for_verify() {}
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   140
  virtual void verify(VerifyOption option) {}
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   141
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   142
  virtual jlong millis_since_last_gc() {
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   143
    // Report time since the VM start
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   144
    return os::elapsed_counter() / NANOSECS_PER_MILLISEC;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   145
  }
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   146
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   147
  virtual void print_on(outputStream* st) const;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   148
  virtual void print_tracing_info() const;
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   149
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   150
};
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   151
7b7c75d87f9b 8204180: Implementation: JEP 318: Epsilon, A No-Op Garbage Collector
shade
parents:
diff changeset
   152
#endif // SHARE_VM_GC_EPSILON_COLLECTEDHEAP_HPP