OSDN Git Service

Merge "Removal of more sampling profiler bits" into gingerbread
[android-x86/dalvik.git] / libdex / DexOptData.h
1 /*
2  * Copyright (C) 2010 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 /*
18  * Functions to parse and manipulate the additional data tables added
19  * to optimized .dex files.
20  */
21
22 #ifndef _LIBDEX_DEXOPTDATA
23 #define _LIBDEX_DEXOPTDATA
24
25 #include <stdbool.h>
26 #include "libdex/DexFile.h"
27
28 /*
29  * Parse the optimized data tables in the given dex file.
30  *
31  * @param data pointer to the start of the entire dex file
32  * @param length length of the entire dex file, in bytes
33  * @param pDexFile pointer to the associated dex file structure
34  */
35 bool dexParseOptData(const u1* data, size_t length, DexFile* pDexFile);
36
37 /*
38  * Compute the checksum of the optimized data tables pointed at by the given
39  * header.
40  */
41 u4 dexComputeOptChecksum(const DexOptHeader* pOptHeader);
42
43 #endif /* def _LIBDEX_DEXOPTDATA */