src/hotspot/share/gc/shenandoah/heuristics/shenandoahTraversalAggressiveHeuristics.hpp
author kbarrett
Mon, 09 Sep 2019 16:54:48 -0400
changeset 58059 baa4dd528de0
parent 55594 66a748c4f3ff
permissions -rw-r--r--
8221361: Eliminate two-phase initialization for PtrQueueSet classes Summary: Move allocator and CBL monitor init to constructor. Reviewed-by: tschatzl, shade
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55594
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
     1
/*
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
     2
 * Copyright (c) 2018, Red Hat, Inc. All rights reserved.
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
     3
 *
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
     4
 * This code is free software; you can redistribute it and/or modify it
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
     5
 * under the terms of the GNU General Public License version 2 only, as
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
     6
 * published by the Free Software Foundation.
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
     7
 *
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
     8
 * This code is distributed in the hope that it will be useful, but WITHOUT
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
     9
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    10
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    11
 * version 2 for more details (a copy is included in the LICENSE file that
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    12
 * accompanied this code).
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    13
 *
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    14
 * You should have received a copy of the GNU General Public License version
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    15
 * 2 along with this work; if not, write to the Free Software Foundation,
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    16
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    17
 *
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    18
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    19
 * or visit www.oracle.com if you need additional information or have any
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    20
 * questions.
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    21
 *
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    22
 */
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    23
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    24
#ifndef SHARE_GC_SHENANDOAH_HEURISTICS_SHENANDOAHTRAVERSALAGGRESSIVEHEURISTICS_HPP
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    25
#define SHARE_GC_SHENANDOAH_HEURISTICS_SHENANDOAHTRAVERSALAGGRESSIVEHEURISTICS_HPP
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    26
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    27
#include "gc/shenandoah/shenandoahHeuristics.hpp"
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    28
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    29
class ShenandoahTraversalAggressiveHeuristics : public ShenandoahHeuristics {
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    30
private:
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    31
  uint64_t _last_cset_select;
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    32
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    33
protected:
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    34
  virtual void choose_collection_set_from_regiondata(ShenandoahCollectionSet* set,
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    35
                                                     RegionData* data, size_t data_size,
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    36
                                                     size_t free);
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    37
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    38
public:
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    39
  ShenandoahTraversalAggressiveHeuristics();
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    40
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    41
  virtual bool is_experimental();
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    42
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    43
  virtual bool is_diagnostic();
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    44
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    45
  virtual const char* name();
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    46
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    47
  virtual void choose_collection_set(ShenandoahCollectionSet* collection_set);
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    48
  virtual bool should_start_gc() const;
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    49
};
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    50
66a748c4f3ff 8227039: Shenandoah: Aggressive heuristics for Traversal mode
rkennke
parents:
diff changeset
    51
#endif // SHARE_GC_SHENANDOAH_HEURISTICS_SHENANDOAHTRAVERSALAGGRESSIVEHEURISTICS_HPP