Home | History | Annotate | Download | only in analysis

Lines Matching full:pmap

43 static bool verifyMap(VerifierData* vdata, const RegisterMap* pMap);
47 static void computeMapStats(RegisterMap* pMap, const Method* method);
49 static RegisterMap* compressMapDifferential(const RegisterMap* pMap,\
51 static RegisterMap* uncompressMapDifferential(const RegisterMap* pMap);
191 RegisterMap* pMap = NULL;
248 pMap = (RegisterMap*) malloc(bufSize);
249 dvmRegisterMapSetFormat(pMap, format);
250 dvmRegisterMapSetOnHeap(pMap, true);
251 dvmRegisterMapSetRegWidth(pMap, regWidth);
252 dvmRegisterMapSetNumEntries(pMap, gcPointCount);
257 mapData = pMap->data;
273 LOGV("mapData=%p pMap=%p bufSize=%d", mapData, pMap, bufSize);
274 assert(mapData - (const u1*) pMap == bufSize);
276 if (REGISTER_MAP_VERIFY && !verifyMap(vdata, pMap))
279 computeMapStats(pMap, vdata->method);
287 pCompMap = compressMapDifferential(pMap, vdata->method);
304 if (compareMaps(pMap, pUncompMap) != 0) {
323 free(pMap);
324 pMap = pCompMap;
330 dvmRegisterMapGetNumEntries(pMap),
331 dvmRegisterMapGetRegWidth(pMap));
335 pResult = pMap;
344 void dvmFreeRegisterMap(RegisterMap* pMap)
346 if (pMap == NULL)
349 assert(dvmRegisterMapGetOnHeap(pMap));
350 free(pMap);
399 static void dumpRegisterMap(const RegisterMap* pMap, int registersSize)
401 const u1* rawMap = pMap->data;
402 const RegisterMapFormat format = dvmRegisterMapGetFormat(pMap);
403 const int numEntries = dvmRegisterMapGetNumEntries(pMap);
404 const int regWidth = dvmRegisterMapGetRegWidth(pMap);
466 static bool verifyMap(VerifierData* vdata, const RegisterMap* pMap)
468 const u1* rawMap = pMap->data;
469 const RegisterMapFormat format = dvmRegisterMapGetFormat(pMap);
470 const int numEntries = dvmRegisterMapGetNumEntries(pMap);
490 if ((vdata->method->registersSize + 7) / 8 != pMap->regWidth) {
492 vdata->method->registersSize, pMap->regWidth);
547 dumpRegisterMap(pMap, vdata->method->registersSize);
570 static size_t computeRegisterMapSize(const RegisterMap* pMap)
573 u1 format = dvmRegisterMapGetFormat(pMap);
574 u2 numEntries = dvmRegisterMapGetNumEntries(pMap);
576 assert(pMap != NULL);
582 return kHeaderSize + (1 + pMap->regWidth) * numEntries;
584 return kHeaderSize + (2 + pMap->regWidth) * numEntries;
588 const u1* ptr = pMap->data;
590 return len + (ptr - (u1*) pMap);
874 const RegisterMap* pMap = (const RegisterMap*) *pPtr;
876 *pPtr = /*align32*/(((u1*) pMap) + computeRegisterMapSize(pMap));
878 pMap, *pPtr, pMap->format, pMap->regWidth,
879 dvmRegisterMapGetNumEntries(pMap));
880 return pMap;
895 const u1* dvmRegisterMapGetLine(const RegisterMap* pMap, int addr)
898 u1 format = dvmRegisterMapGetFormat(pMap);
899 u2 numEntries = dvmRegisterMapGetNumEntries(pMap);
918 lineWidth = addrWidth + pMap->regWidth;
930 data = pMap->data;
940 assert(data == pMap->data + lineWidth * numEntries);
949 data = pMap->data + lineWidth * mid;
1248 static void computeMapStats(RegisterMap* pMap, const Method* method)
1251 const u1 format = dvmRegisterMapGetFormat(pMap);
1252 const u2 numEntries = dvmRegisterMapGetNumEntries(pMap);
1253 const u1* rawMap = pMap->data;
1312 for (regByte = 0; regByte < pMap->regWidth; regByte++) {
1360 rawMap += pMap->regWidth;
1442 static RegisterMap* compressMapDifferential(const RegisterMap* pMap,
1446 int origSize = computeRegisterMapSize(pMap);
1458 u1 format = dvmRegisterMapGetFormat(pMap);
1471 regWidth = dvmRegisterMapGetRegWidth(pMap);
1472 numEntries = dvmRegisterMapGetNumEntries(pMap);
1478 dumpRegisterMap(pMap, -1);
1509 const u1* mapData = pMap->data;
1672 computeRegisterMapSize(pMap), computeRegisterMapSize(pNewMap),
1695 static RegisterMap* uncompressMapDifferential(const RegisterMap* pMap)
1698 u1 format = dvmRegisterMapGetFormat(pMap);
1707 regWidth = dvmRegisterMapGetRegWidth(pMap);
1708 numEntries = dvmRegisterMapGetNumEntries(pMap);
1711 const u1* srcPtr = pMap->data;
1829 computeRegisterMapSize(pMap), computeRegisterMapSize(pNewMap));