Path: blob/master/runtime/gc_realtime/Metronome.hpp
5986 views
/*******************************************************************************1* Copyright (c) 1991, 2019 IBM Corp. and others2*3* This program and the accompanying materials are made available under4* the terms of the Eclipse Public License 2.0 which accompanies this5* distribution and is available at https://www.eclipse.org/legal/epl-2.0/6* or the Apache License, Version 2.0 which accompanies this distribution and7* is available at https://www.apache.org/licenses/LICENSE-2.0.8*9* This Source Code may also be made available under the following10* Secondary Licenses when the conditions for such availability set11* forth in the Eclipse Public License, v. 2.0 are satisfied: GNU12* General Public License, version 2 with the GNU Classpath13* Exception [1] and GNU General Public License, version 2 with the14* OpenJDK Assembly Exception [2].15*16* [1] https://www.gnu.org/software/classpath/license.html17* [2] http://openjdk.java.net/legal/assembly-exception.html18*19* SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception20*******************************************************************************/2122#if !defined(METRONOME_HPP_)23#define METRONOME_HPP_2425/* @ddr_namespace: default */26#include "omr.h"27#include "omrcfg.h"2829#include <assert.h>30#define ASSERT_LEVEL 031#define assert1(expr) assert((ASSERT_LEVEL < 1) || (expr));32#define assert2(expr) assert((ASSERT_LEVEL < 2) || (expr));3334#define MAX_UINT ((uintptr_t) (-1))3536#define CLOCK_SWITCH_TICK_THRESHOLD 100000037#define INTER_YIELD_WARNING_THRESHOLD_NS 8000038/* INTER_YIELD_WARNING_THRESHOLD_NS indicates that 80 usec for inter-yield checks is already considered large.39* The largest interval between yield checks should be bounded by 500 usec, which is a HardRT quanta.40*/41#define INTER_YIELD_MAX_NS 5000004243#define INTER_YIELD_WARNING_THRESHOLD_NS 8000044#define UTILIZATION_WINDOW_SIZE 1004546#define ROOT_GRANULARITY 1004748/*49* NOTE: Since we are using safe points, any information recorded by the50* GC when it is known that threads are stopped, can be accessed by the threads51* without a critical section.52*/53#define GC_PHASE_IDLE 0x0000000054#define GC_PHASE_ROOT 0x0000000155#define GC_PHASE_TRACE 0x0000000256#define GC_PHASE_SWEEP 0x0000000457#define GC_PHASE_CONCURRENT_TRACE 0x0000000858#define GC_PHASE_CONCURRENT_SWEEP 0x0000001059#define GC_PHASE_UNLOADING_CLASS_LOADERS 0x000000206061#define MINIMUM_FREE_CHUNK_SIZE 646263#endif /* METRONOME_HPP_ */646566