Mathieu Chartier | 0de9f73 | 2013-11-22 17:58:48 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (C) 2013 The Android Open Source Project |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
| 16 | |
| 17 | #ifndef ART_RUNTIME_GC_COLLECTOR_TYPE_H_ |
| 18 | #define ART_RUNTIME_GC_COLLECTOR_TYPE_H_ |
| 19 | |
| 20 | #include <ostream> |
| 21 | |
| 22 | namespace art { |
| 23 | namespace gc { |
| 24 | |
| 25 | // Which types of collections are able to be performed. |
| 26 | enum CollectorType { |
Mathieu Chartier | 7bf82af | 2013-12-06 16:51:45 -0800 | [diff] [blame] | 27 | // No collector selected. |
| 28 | kCollectorTypeNone, |
Mathieu Chartier | 7410f29 | 2013-11-24 13:17:35 -0800 | [diff] [blame] | 29 | // Non concurrent mark-sweep. |
Mathieu Chartier | 0de9f73 | 2013-11-22 17:58:48 -0800 | [diff] [blame] | 30 | kCollectorTypeMS, |
Mathieu Chartier | 7410f29 | 2013-11-24 13:17:35 -0800 | [diff] [blame] | 31 | // Concurrent mark-sweep. |
Mathieu Chartier | 0de9f73 | 2013-11-22 17:58:48 -0800 | [diff] [blame] | 32 | kCollectorTypeCMS, |
Mathieu Chartier | 7410f29 | 2013-11-24 13:17:35 -0800 | [diff] [blame] | 33 | // Semi-space / mark-sweep hybrid, enables compaction. |
Mathieu Chartier | 0de9f73 | 2013-11-22 17:58:48 -0800 | [diff] [blame] | 34 | kCollectorTypeSS, |
Hiroshi Yamauchi | 6f4ffe4 | 2014-01-13 12:30:44 -0800 | [diff] [blame] | 35 | // A generational variant of kCollectorTypeSS. |
| 36 | kCollectorTypeGSS, |
Mathieu Chartier | d5a89ee | 2014-01-31 09:55:13 -0800 | [diff] [blame] | 37 | // Heap trimming collector, doesn't do any actual collecting. |
| 38 | kCollectorTypeHeapTrim, |
Hiroshi Yamauchi | d5307ec | 2014-03-27 21:07:51 -0700 | [diff] [blame^] | 39 | // A (mostly) concurrent copying collector. |
| 40 | kCollectorTypeCC, |
Mathieu Chartier | 0de9f73 | 2013-11-22 17:58:48 -0800 | [diff] [blame] | 41 | }; |
| 42 | std::ostream& operator<<(std::ostream& os, const CollectorType& collector_type); |
| 43 | |
| 44 | } // namespace gc |
| 45 | } // namespace art |
| 46 | |
| 47 | #endif // ART_RUNTIME_GC_COLLECTOR_TYPE_H_ |