Mercurial > hg > truffle
comparison src/share/vm/gc_implementation/shared/vmGCOperations.hpp @ 6948:e522a00b91aa
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 12 Nov 2012 23:14:12 +0100 |
parents | 685df3c6f84b |
children | 16fb9f942703 |
comparison
equal
deleted
inserted
replaced
6711:ae13cc658b80 | 6948:e522a00b91aa |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
40 // VM_GC_HeapInspection | 40 // VM_GC_HeapInspection |
41 // VM_GenCollectForAllocation | 41 // VM_GenCollectForAllocation |
42 // VM_GenCollectFull | 42 // VM_GenCollectFull |
43 // VM_GenCollectFullConcurrent | 43 // VM_GenCollectFullConcurrent |
44 // VM_ParallelGCFailedAllocation | 44 // VM_ParallelGCFailedAllocation |
45 // VM_ParallelGCFailedPermanentAllocation | |
46 // VM_ParallelGCSystemGC | 45 // VM_ParallelGCSystemGC |
47 // VM_GC_Operation | 46 // VM_GC_Operation |
48 // - implements methods common to all classes in the hierarchy: | 47 // - implements methods common to all classes in the hierarchy: |
49 // prevents multiple gc requests and manages lock on heap; | 48 // prevents multiple gc requests and manages lock on heap; |
50 // | 49 // |
51 // VM_GC_HeapInspection | 50 // VM_GC_HeapInspection |
52 // - prints class histogram on SIGBREAK if PrintClassHistogram | 51 // - prints class histogram on SIGBREAK if PrintClassHistogram |
53 // is specified; and also the attach "inspectheap" operation | 52 // is specified; and also the attach "inspectheap" operation |
54 // | 53 // |
55 // VM_GenCollectForAllocation | 54 // VM_GenCollectForAllocation |
56 // VM_GenCollectForPermanentAllocation | |
57 // VM_ParallelGCFailedAllocation | 55 // VM_ParallelGCFailedAllocation |
58 // VM_ParallelGCFailedPermanentAllocation | |
59 // - this operation is invoked when allocation is failed; | 56 // - this operation is invoked when allocation is failed; |
60 // operation performs garbage collection and tries to | 57 // operation performs garbage collection and tries to |
61 // allocate afterwards; | 58 // allocate afterwards; |
62 // | 59 // |
63 // VM_GenCollectFull | 60 // VM_GenCollectFull |
189 ~VM_GenCollectFull() {} | 186 ~VM_GenCollectFull() {} |
190 virtual VMOp_Type type() const { return VMOp_GenCollectFull; } | 187 virtual VMOp_Type type() const { return VMOp_GenCollectFull; } |
191 virtual void doit(); | 188 virtual void doit(); |
192 }; | 189 }; |
193 | 190 |
194 class VM_GenCollectForPermanentAllocation: public VM_GC_Operation { | 191 class VM_CollectForMetadataAllocation: public VM_GC_Operation { |
195 private: | 192 private: |
196 HeapWord* _res; | 193 MetaWord* _result; |
197 size_t _size; // size of object to be allocated | 194 size_t _size; // size of object to be allocated |
198 public: | 195 Metaspace::MetadataType _mdtype; |
199 VM_GenCollectForPermanentAllocation(size_t size, | 196 ClassLoaderData* _loader_data; |
197 public: | |
198 VM_CollectForMetadataAllocation(ClassLoaderData* loader_data, | |
199 size_t size, Metaspace::MetadataType mdtype, | |
200 unsigned int gc_count_before, | 200 unsigned int gc_count_before, |
201 unsigned int full_gc_count_before, | 201 unsigned int full_gc_count_before, |
202 GCCause::Cause gc_cause) | 202 GCCause::Cause gc_cause) |
203 : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true), | 203 : VM_GC_Operation(gc_count_before, gc_cause, full_gc_count_before, true), |
204 _size(size) { | 204 _loader_data(loader_data), _size(size), _mdtype(mdtype), _result(NULL) { |
205 _res = NULL; | 205 } |
206 _gc_cause = gc_cause; | 206 ~VM_CollectForMetadataAllocation() { |
207 } | 207 MetaspaceGC::set_expand_after_GC(false); |
208 ~VM_GenCollectForPermanentAllocation() {} | 208 } |
209 virtual VMOp_Type type() const { return VMOp_GenCollectForPermanentAllocation; } | 209 virtual VMOp_Type type() const { return VMOp_CollectForMetadataAllocation; } |
210 virtual void doit(); | 210 virtual void doit(); |
211 HeapWord* result() const { return _res; } | 211 MetaWord* result() const { return _result; } |
212 }; | 212 }; |
213 | 213 |
214 class SvcGCMarker : public StackObj { | 214 class SvcGCMarker : public StackObj { |
215 private: | 215 private: |
216 JvmtiGCMarker _jgcm; | 216 JvmtiGCMarker _jgcm; |