Lines Matching refs:rootParser

617 static float accountingGetCurrentAmplification(XML_Parser rootParser);
620 static void accountingReportDiff(XML_Parser rootParser,
800 expat_heap_stat(XML_Parser rootParser, char operator, XmlBigCount absDiff, in expat_heap_stat() argument
804 = (float)newTotal / (float)rootParser->m_accounting.countBytesDirect; in expat_heap_stat()
809 (void *)rootParser, rootParser->m_accounting.countBytesDirect, operator, in expat_heap_stat()
814 expat_heap_increase_tolerable(XML_Parser rootParser, XmlBigCount increase, in expat_heap_increase_tolerable() argument
816 assert(rootParser != NULL); in expat_heap_increase_tolerable()
823 if ((XmlBigCount)-1 - rootParser->m_alloc_tracker.bytesAllocated < increase) { in expat_heap_increase_tolerable()
826 newTotal = rootParser->m_alloc_tracker.bytesAllocated + increase; in expat_heap_increase_tolerable()
828 if (newTotal >= rootParser->m_alloc_tracker.activationThresholdBytes) { in expat_heap_increase_tolerable()
832 = (float)newTotal / (float)rootParser->m_accounting.countBytesDirect; in expat_heap_increase_tolerable()
834 > rootParser->m_alloc_tracker.maximumAmplificationFactor) { in expat_heap_increase_tolerable()
840 if (! tolerable && (rootParser->m_alloc_tracker.debugLevel >= 1)) { in expat_heap_increase_tolerable()
841 expat_heap_stat(rootParser, '+', increase, newTotal, newTotal, sourceLine); in expat_heap_increase_tolerable()
858 const XML_Parser rootParser = getRootParserOf(parser, NULL); in expat_malloc() local
859 assert(rootParser->m_parentParser == NULL); in expat_malloc()
863 if ((XmlBigCount)-1 - rootParser->m_alloc_tracker.bytesAllocated in expat_malloc()
868 if (! expat_heap_increase_tolerable(rootParser, bytesToAllocate, in expat_malloc()
884 rootParser->m_alloc_tracker.bytesAllocated += bytesToAllocate; in expat_malloc()
887 if (rootParser->m_alloc_tracker.debugLevel >= 2) { in expat_malloc()
888 if (rootParser->m_alloc_tracker.bytesAllocated in expat_malloc()
889 > rootParser->m_alloc_tracker.peakBytesAllocated) { in expat_malloc()
890 rootParser->m_alloc_tracker.peakBytesAllocated in expat_malloc()
891 = rootParser->m_alloc_tracker.bytesAllocated; in expat_malloc()
893 expat_heap_stat(rootParser, '+', bytesToAllocate, in expat_malloc()
894 rootParser->m_alloc_tracker.bytesAllocated, in expat_malloc()
895 rootParser->m_alloc_tracker.peakBytesAllocated, sourceLine); in expat_malloc()
913 const XML_Parser rootParser = getRootParserOf(parser, NULL); in expat_free() local
914 assert(rootParser->m_parentParser == NULL); in expat_free()
923 assert(rootParser->m_alloc_tracker.bytesAllocated >= bytesAllocated); in expat_free()
924 rootParser->m_alloc_tracker.bytesAllocated -= bytesAllocated; in expat_free()
927 if (rootParser->m_alloc_tracker.debugLevel >= 2) { in expat_free()
928 expat_heap_stat(rootParser, '-', bytesAllocated, in expat_free()
929 rootParser->m_alloc_tracker.bytesAllocated, in expat_free()
930 rootParser->m_alloc_tracker.peakBytesAllocated, sourceLine); in expat_free()
954 const XML_Parser rootParser = getRootParserOf(parser, NULL); in expat_realloc() local
955 assert(rootParser->m_parentParser == NULL); in expat_realloc()
969 if (! expat_heap_increase_tolerable(rootParser, absDiff, sourceLine)) { in expat_realloc()
988 assert((XmlBigCount)-1 - rootParser->m_alloc_tracker.bytesAllocated in expat_realloc()
990 rootParser->m_alloc_tracker.bytesAllocated += absDiff; in expat_realloc()
992 assert(rootParser->m_alloc_tracker.bytesAllocated >= absDiff); in expat_realloc()
993 rootParser->m_alloc_tracker.bytesAllocated -= absDiff; in expat_realloc()
997 if (rootParser->m_alloc_tracker.debugLevel >= 2) { in expat_realloc()
998 if (rootParser->m_alloc_tracker.bytesAllocated in expat_realloc()
999 > rootParser->m_alloc_tracker.peakBytesAllocated) { in expat_realloc()
1000 rootParser->m_alloc_tracker.peakBytesAllocated in expat_realloc()
1001 = rootParser->m_alloc_tracker.bytesAllocated; in expat_realloc()
1003 expat_heap_stat(rootParser, isIncrease ? '+' : '-', absDiff, in expat_realloc()
1004 rootParser->m_alloc_tracker.bytesAllocated, in expat_realloc()
1005 rootParser->m_alloc_tracker.peakBytesAllocated, sourceLine); in expat_realloc()
1248 const XML_Parser rootParser = getRootParserOf(parser, NULL); in get_hash_secret_salt() local
1249 assert(! rootParser->m_parentParser); in get_hash_secret_salt()
1251 return rootParser->m_hash_secret_salt; in get_hash_secret_salt()
1351 const XML_Parser rootParser = getRootParserOf(parentParser, NULL); local
1352 if (! expat_heap_increase_tolerable(rootParser, increase, __LINE__)) {
1422 const XML_Parser rootParser = getRootParserOf(parser, NULL); local
1423 assert(rootParser->m_parentParser == NULL);
1424 assert(SIZE_MAX - rootParser->m_alloc_tracker.bytesAllocated >= increase);
1425 rootParser->m_alloc_tracker.bytesAllocated += increase;
1428 if (rootParser->m_alloc_tracker.debugLevel >= 2) {
1429 if (rootParser->m_alloc_tracker.bytesAllocated
1430 > rootParser->m_alloc_tracker.peakBytesAllocated) {
1431 rootParser->m_alloc_tracker.peakBytesAllocated
1432 = rootParser->m_alloc_tracker.bytesAllocated;
1435 expat_heap_stat(rootParser, '+', increase,
1436 rootParser->m_alloc_tracker.bytesAllocated,
1437 rootParser->m_alloc_tracker.peakBytesAllocated, __LINE__);
2325 const XML_Parser rootParser = getRootParserOf(parser, NULL); local
2326 assert(! rootParser->m_parentParser);
2329 if (parserBusy(rootParser))
2331 rootParser->m_hash_secret_salt = hash_salt;
8459 accountingGetCurrentAmplification(XML_Parser rootParser) { argument
8463 = rootParser->m_accounting.countBytesDirect
8464 + rootParser->m_accounting.countBytesIndirect;
8466 = rootParser->m_accounting.countBytesDirect
8468 / (float)(rootParser->m_accounting.countBytesDirect))
8470 + rootParser->m_accounting.countBytesIndirect)
8472 assert(! rootParser->m_parentParser);
8478 const XML_Parser rootParser = getRootParserOf(originParser, NULL); local
8479 assert(! rootParser->m_parentParser);
8481 if (rootParser->m_accounting.debugLevel == 0u) {
8486 = accountingGetCurrentAmplification(rootParser);
8490 (void *)rootParser, rootParser->m_accounting.countBytesDirect,
8491 rootParser->m_accounting.countBytesIndirect,
8501 accountingReportDiff(XML_Parser rootParser, argument
8505 assert(! rootParser->m_parentParser);
8518 if ((rootParser->m_accounting.debugLevel >= 3u)
8556 const XML_Parser rootParser local
8558 assert(! rootParser->m_parentParser);
8561 = (account == XML_ACCOUNT_DIRECT) && (originParser == rootParser);
8565 = isDirect ? &rootParser->m_accounting.countBytesDirect
8566 : &rootParser->m_accounting.countBytesIndirect;
8574 = rootParser->m_accounting.countBytesDirect
8575 + rootParser->m_accounting.countBytesIndirect;
8577 = accountingGetCurrentAmplification(rootParser);
8579 = (countBytesOutput < rootParser->m_accounting.activationThresholdBytes)
8581 <= rootParser->m_accounting.maximumAmplificationFactor);
8583 if (rootParser->m_accounting.debugLevel >= 2u) {
8584 accountingReportStats(rootParser, "");
8585 accountingReportDiff(rootParser, levelsAwayFromRootParser, before, after,
8607 entityTrackingReportStats(XML_Parser rootParser, ENTITY *entity, argument
8609 assert(! rootParser->m_parentParser);
8610 if (rootParser->m_entity_stats.debugLevel == 0u)
8622 (void *)rootParser, rootParser->m_entity_stats.countEverOpened,
8623 rootParser->m_entity_stats.currentDepth,
8624 rootParser->m_entity_stats.maximumDepthSeen,
8625 ((int)rootParser->m_entity_stats.currentDepth - 1) * 2, "",
8632 const XML_Parser rootParser = getRootParserOf(originParser, NULL); local
8633 assert(! rootParser->m_parentParser);
8635 rootParser->m_entity_stats.countEverOpened++;
8636 rootParser->m_entity_stats.currentDepth++;
8637 if (rootParser->m_entity_stats.currentDepth
8638 > rootParser->m_entity_stats.maximumDepthSeen) {
8639 rootParser->m_entity_stats.maximumDepthSeen++;
8642 entityTrackingReportStats(rootParser, entity, "OPEN ", sourceLine);
8647 const XML_Parser rootParser = getRootParserOf(originParser, NULL); local
8648 assert(! rootParser->m_parentParser);
8650 entityTrackingReportStats(rootParser, entity, "CLOSE", sourceLine);
8651 rootParser->m_entity_stats.currentDepth--;
8658 XML_Parser rootParser = parser; local
8660 while (rootParser->m_parentParser) {
8661 rootParser = rootParser->m_parentParser;
8664 assert(! rootParser->m_parentParser);
8668 return rootParser;