Bug 141020

Summary: Remove WTF::fastMallocGoodSize().
Product: WebKit Reporter: Andreas Kling <kling>
Component: Web Template FrameworkAssignee: Andreas Kling <kling>
Status: REOPENED    
Severity: Normal CC: ahmad.saleem792, benjamin, bfulgham, cmarcelo, commit-queue, ggaren, kling, sihui_liu
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 141335    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch for landing none

Andreas Kling
Reported 2015-01-28 18:07:20 PST
bmalloc's fastMallocGoodSize(size) just returns 'size', so it's of no utility anymore.
Attachments
Patch (6.94 KB, patch)
2015-01-28 18:07 PST, Andreas Kling
no flags
Patch for landing (7.46 KB, patch)
2015-02-05 20:45 PST, Andreas Kling
no flags
Andreas Kling
Comment 1 2015-01-28 18:07:55 PST
Benjamin Poulain
Comment 2 2015-01-28 18:33:31 PST
Fast malloc can't give us the bucket size efficiently?
Benjamin Poulain
Comment 3 2015-01-28 18:33:43 PST
s/Fast Malloc/bmalloc
Anders Carlsson
Comment 4 2015-01-28 20:38:42 PST
Comment on attachment 245595 [details] Patch k
WebKit Commit Bot
Comment 5 2015-02-05 17:50:13 PST
Comment on attachment 245595 [details] Patch Rejecting attachment 245595 [details] from commit-queue. Failed to run "['/Volumes/Data/EWS/WebKit/Tools/Scripts/webkit-patch', '--status-host=webkit-queues.appspot.com', '--bot-id=webkit-cq-01', 'apply-attachment', '--no-update', '--non-interactive', 245595, '--port=mac']" exit_code: 2 cwd: /Volumes/Data/EWS/WebKit Last 500 characters of output: cpp patching file Source/WTF/wtf/FastMalloc.cpp Hunk #1 FAILED at 219. Hunk #2 FAILED at 334. Hunk #3 succeeded at 2753 (offset -33 lines). 2 out of 3 hunks FAILED -- saving rejects to file Source/WTF/wtf/FastMalloc.cpp.rej patching file Source/WTF/wtf/FastMalloc.h Hunk #1 succeeded at 35 with fuzz 2. patching file Source/WTF/wtf/Vector.h Failed to run "[u'/Volumes/Data/EWS/WebKit/Tools/Scripts/svn-apply', '--force', '--reviewer', u'Anders Carlsson']" exit_code: 1 cwd: /Volumes/Data/EWS/WebKit Full output: http://webkit-queues.appspot.com/results/5577581122289664
Andreas Kling
Comment 6 2015-02-05 20:45:49 PST
Created attachment 246147 [details] Patch for landing
WebKit Commit Bot
Comment 7 2015-02-06 02:04:02 PST
Comment on attachment 246147 [details] Patch for landing Clearing flags on attachment: 246147 Committed r179743: <http://trac.webkit.org/changeset/179743>
WebKit Commit Bot
Comment 8 2015-02-06 02:04:06 PST
All reviewed patches have been landed. Closing bug.
Brent Fulgham
Comment 9 2015-02-06 11:45:02 PST
For reasons I don't yet understand, this has absolutely destroyed our ability to run DumpRenderTree on Windows. I'll see if this method was being used manually in the Windows code somewhere.
WebKit Commit Bot
Comment 10 2015-02-06 12:20:39 PST
Re-opened since this is blocked by bug 141335
Brent Fulgham
Comment 11 2015-02-06 12:38:25 PST
I think the problem is that our Open Source test bots are running with WebKitQuartzCoreAdditions.dll that was linked with the WTF::fastMallocGoodSize() symbol. We need to roll out updates to WKQCA before we land this.
Andreas Kling
Comment 12 2015-02-06 13:14:39 PST
(In reply to comment #11) > I think the problem is that our Open Source test bots are running with > WebKitQuartzCoreAdditions.dll that was linked with the > WTF::fastMallocGoodSize() symbol. > > We need to roll out updates to WKQCA before we land this. I think the easier way is to just leave the symbol in there as a functioning stub, and just remove the use from Vector.h right now.
Alexey Proskuryakov
Comment 13 2015-02-06 22:57:52 PST
This also broke WebKit nightlies, which may be more challenging to fix. See bug 141344.
Alexey Proskuryakov
Comment 14 2015-02-07 20:43:01 PST
I guess it's no more challenging to fix if it just returns size though.
Csaba Osztrogonác
Comment 15 2015-09-14 11:16:42 PDT
Comment on attachment 245595 [details] Patch Cleared Anders Carlsson's review+ from obsolete attachment 245595 [details] so that this bug does not appear in http://webkit.org/pending-commit.
Ahmad Saleem
Comment 16 2024-07-08 20:04:43 PDT
We only have this call-site using it: https://searchfox.org/wubkat/source/Source/WebCore/platform/sql/SQLiteDatabase.cpp#96 void SQLiteDatabase::useFastMalloc() { #if ENABLE(SQLITE_FAST_MALLOC) int returnCode = sqlite3_config(SQLITE_CONFIG_LOOKASIDE, 0, 0); RELEASE_LOG_ERROR_IF(returnCode != SQLITE_OK, SQLDatabase, "Unable to reduce lookaside buffer size: %d", returnCode); static sqlite3_mem_methods fastMallocMethods = { [](int n) { return fastMalloc(n); }, fastFree, [](void *p, int n) { return fastRealloc(p, n); }, [](void *p) { return static_cast<int>(fastMallocSize(p)); }, [](int n) { return static_cast<int>(fastMallocGoodSize(n)); }, [](void*) { return SQLITE_OK; }, [](void*) { }, nullptr }; returnCode = sqlite3_config(SQLITE_CONFIG_MALLOC, &fastMallocMethods); RELEASE_LOG_ERROR_IF(returnCode != SQLITE_OK, SQLDatabase, "Unable to replace SQLite malloc: %d", returnCode); #endif }
Note You need to log in before you can comment on or make changes to this bug.