Home | History | Annotate | Download | only in alloc
      1 /*
      2  * Copyright (C) 2008 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  * DDM-specific internal heap functions.
     18  */
     19 #ifndef DALVIK_ALLOC_DDMHEAP_H_
     20 #define DALVIK_ALLOC_DDMHEAP_H_
     21 
     22 /*
     23  * Sends the current heap info to the DDM server.
     24  * Should be called after a GC when gcHeap->ddmHpifWhen
     25  * is non-zero.
     26  */
     27 void dvmDdmSendHeapInfo(int reason, bool shouldLock);
     28 
     29 /*
     30  * Walks through the heap and sends a series of
     31  * HPST/NHST, HPSG/HPSO/NHSG, and HPEN/NHEN chunks that describe
     32  * the contents of the GC or native heap.
     33  *
     34  * @param shouldLock If true, grab the heap lock.  If false,
     35  *                   the heap lock must already be held.
     36  * @param heap       If false, dump the GC heap; if true, dump the
     37  *                   native heap.
     38  */
     39 void dvmDdmSendHeapSegments(bool shouldLock, bool native);
     40 
     41 #endif  // DALVIK_ALLOC_DDMHEAP_H_
     42