Changeset 206924 in webkit
- Timestamp:
- Oct 7, 2016, 12:03:13 PM (9 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r206922 r206924 1 2016-10-07 Alex Christensen <achristensen@webkit.org> 2 3 Disable URLParser logs by default in all builds 4 https://bugs.webkit.org/show_bug.cgi?id=163135 5 6 Reviewed by Brady Eidson. 7 8 In debug builds with the URLParser enabled, some tests time out because 9 parameters to generate log strings are being evaluated for each character of each URL 10 and then not being used if URLParser logs are disabled. Generating these unused parameters 11 is too slow even for debug builds. Let's only generate them if they are to be used. 12 13 No change in behaviour. 14 15 * platform/URLParser.cpp: 16 (WebCore::URLParser::parse): 17 (WebCore::URLParser::allValuesEqual): 18 1 19 2016-10-07 Andreas Kling <akling@apple.com> 2 20 -
trunk/Source/WebCore/platform/URLParser.cpp
r206887 r206924 34 34 namespace WebCore { 35 35 36 #define URL_PARSER_DEBUGGING 0 37 38 #if URL_PARSER_DEBUGGING 39 #define URL_PARSER_LOG(...) LOG(URLParser, __VA_ARGS__) 40 #else 41 #define URL_PARSER_LOG(...) 42 #endif 43 36 44 template<typename CharacterType> 37 45 class CodePointIterator { … … 1151 1159 void URLParser::parse(const CharacterType* input, const unsigned length, const URL& base, const TextEncoding& encoding) 1152 1160 { 1153 LOG(URLParser,"Parsing URL <%s> base <%s> encoding <%s>", String(input, length).utf8().data(), base.string().utf8().data(), encoding.name());1161 URL_PARSER_LOG("Parsing URL <%s> base <%s> encoding <%s>", String(input, length).utf8().data(), base.string().utf8().data(), encoding.name()); 1154 1162 m_url = { }; 1155 1163 ASSERT(m_asciiBuffer.isEmpty()); … … 1196 1204 }; 1197 1205 1198 #define LOG_STATE(x) LOG(URLParser,"State %s, code point %c, parsed data <%s> size %zu", x, *c, parsedDataView(0, currentPosition(c)).utf8().data(), currentPosition(c))1199 #define LOG_FINAL_STATE(x) LOG(URLParser,"Final State: %s", x)1206 #define LOG_STATE(x) URL_PARSER_LOG("State %s, code point %c, parsed data <%s> size %zu", x, *c, parsedDataView(0, currentPosition(c)).utf8().data(), currentPosition(c)) 1207 #define LOG_FINAL_STATE(x) URL_PARSER_LOG("Final State: %s", x) 1200 1208 1201 1209 State state = State::SchemeStart; … … 1444 1452 auto findLastAt = c; 1445 1453 while (!findLastAt.atEnd()) { 1446 LOG(URLParser,"Finding last @: %c", *findLastAt);1454 URL_PARSER_LOG("Finding last @: %c", *findLastAt); 1447 1455 if (*findLastAt == '@') 1448 1456 lastAt = findLastAt; … … 1806 1814 case State::Fragment: 1807 1815 do { 1808 LOG(URLParser,"State Fragment");1816 URL_PARSER_LOG("State Fragment"); 1809 1817 if (!m_didSeeUnicodeFragmentCodePoint && isASCII(*c)) 1810 1818 appendToASCIIBuffer(*c); … … 2050 2058 } 2051 2059 m_url.m_isValid = true; 2052 LOG(URLParser,"Parsed URL <%s>", m_url.m_string.utf8().data());2060 URL_PARSER_LOG("Parsed URL <%s>", m_url.m_string.utf8().data()); 2053 2061 } 2054 2062 … … 2780 2788 // FIXME: m_cannotBeABaseURL is not compared because the old URL::parse did not use it, 2781 2789 // but once we get rid of URL::parse its value should be tested. 2782 LOG(URLParser,"%d %d %d %d %d %d %d %d %d %d %d %d %s\n%d %d %d %d %d %d %d %d %d %d %d %d %s",2790 URL_PARSER_LOG("%d %d %d %d %d %d %d %d %d %d %d %d %s\n%d %d %d %d %d %d %d %d %d %d %d %d %s", 2783 2791 a.m_isValid, 2784 2792 a.m_protocolIsInHTTPFamily,
Note:
See TracChangeset
for help on using the changeset viewer.