12faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes/* 22faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * Copyright (C) 2011 The Android Open Source Project 32faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * 42faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * Licensed under the Apache License, Version 2.0 (the "License"); 52faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * you may not use this file except in compliance with the License. 62faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * You may obtain a copy of the License at 72faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * 82faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * http://www.apache.org/licenses/LICENSE-2.0 92faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * 102faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * Unless required by applicable law or agreed to in writing, software 112faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * distributed under the License is distributed on an "AS IS" BASIS, 122faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 132faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * See the License for the specific language governing permissions and 142faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes * limitations under the License. 152faa5f1271587cda765f26bcf2951065300a01ffElliott Hughes */ 161f87008b165d26541d832ff805250afdc89c253dBrian Carlstrom 17fc0e3219edc9a5bf81b166e82fd5db2796eb6a0dBrian Carlstrom#ifndef ART_RUNTIME_GC_COLLECTOR_GC_TYPE_H_ 18fc0e3219edc9a5bf81b166e82fd5db2796eb6a0dBrian Carlstrom#define ART_RUNTIME_GC_COLLECTOR_GC_TYPE_H_ 191d54e73444e017d3a65234e0f193846f3e27472bIan Rogers 203cf225386e8129dcbe32b289279ecb87ec255318Mathieu Chartier#include <iosfwd> 211f87008b165d26541d832ff805250afdc89c253dBrian Carlstrom 221f87008b165d26541d832ff805250afdc89c253dBrian Carlstromnamespace art { 231d54e73444e017d3a65234e0f193846f3e27472bIan Rogersnamespace gc { 241d54e73444e017d3a65234e0f193846f3e27472bIan Rogersnamespace collector { 251f87008b165d26541d832ff805250afdc89c253dBrian Carlstrom 261d54e73444e017d3a65234e0f193846f3e27472bIan Rogers// The type of collection to be performed. The ordering of the enum matters, it is used to 271d54e73444e017d3a65234e0f193846f3e27472bIan Rogers// determine which GCs are run first. 282dd0e2cea360bc9206eb88ecc40d259e796c239dIan Rogersenum GcType { 291d54e73444e017d3a65234e0f193846f3e27472bIan Rogers // Placeholder for when no GC has been performed. 302dd0e2cea360bc9206eb88ecc40d259e796c239dIan Rogers kGcTypeNone, 311d54e73444e017d3a65234e0f193846f3e27472bIan Rogers // Sticky mark bits GC that attempts to only free objects allocated since the last GC. 322dd0e2cea360bc9206eb88ecc40d259e796c239dIan Rogers kGcTypeSticky, 331d54e73444e017d3a65234e0f193846f3e27472bIan Rogers // Partial GC that marks the application heap but not the Zygote. 342dd0e2cea360bc9206eb88ecc40d259e796c239dIan Rogers kGcTypePartial, 351d54e73444e017d3a65234e0f193846f3e27472bIan Rogers // Full GC that marks and frees in both the application and Zygote heap. 362dd0e2cea360bc9206eb88ecc40d259e796c239dIan Rogers kGcTypeFull, 371d54e73444e017d3a65234e0f193846f3e27472bIan Rogers // Number of different GC types. 382dd0e2cea360bc9206eb88ecc40d259e796c239dIan Rogers kGcTypeMax, 391f87008b165d26541d832ff805250afdc89c253dBrian Carlstrom}; 402dd0e2cea360bc9206eb88ecc40d259e796c239dIan Rogersstd::ostream& operator<<(std::ostream& os, const GcType& policy); 411f87008b165d26541d832ff805250afdc89c253dBrian Carlstrom 421d54e73444e017d3a65234e0f193846f3e27472bIan Rogers} // namespace collector 431d54e73444e017d3a65234e0f193846f3e27472bIan Rogers} // namespace gc 441f87008b165d26541d832ff805250afdc89c253dBrian Carlstrom} // namespace art 451f87008b165d26541d832ff805250afdc89c253dBrian Carlstrom 46fc0e3219edc9a5bf81b166e82fd5db2796eb6a0dBrian Carlstrom#endif // ART_RUNTIME_GC_COLLECTOR_GC_TYPE_H_ 47