diff options
Diffstat (limited to 'vm/alloc/DdmHeap.h')
-rw-r--r-- | vm/alloc/DdmHeap.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/vm/alloc/DdmHeap.h b/vm/alloc/DdmHeap.h new file mode 100644 index 0000000..c3e11dc --- /dev/null +++ b/vm/alloc/DdmHeap.h @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2008 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * DDM-specific internal heap functions. + */ +#ifndef _DALVIK_ALLOC_DDMHEAP +#define _DALVIK_ALLOC_DDMHEAP + +/* + * Sends the current heap info to the DDM server. + * Should be called after a GC when gcHeap->ddmHpifWhen + * is non-zero. + */ +void dvmDdmSendHeapInfo(int reason, bool shouldLock); + +/* + * Walks through the heap and sends a series of + * HPST/NHST, HPSG/HPSO/NHSG, and HPEN/NHEN chunks that describe + * the contents of the GC or native heap. + * + * @param shouldLock If true, grab the heap lock. If false, + * the heap lock must already be held. + * @param heap If false, dump the GC heap; if true, dump the + * native heap. + */ +void dvmDdmSendHeapSegments(bool shouldLock, bool native); + +#endif // _DALVIK_ALLOC_DDMHEAP |