Bug 73389

Summary: move data in IDBPendingTransactionMonitor from static to ThreadLocal
Product: WebKit Reporter: David Grogan <dgrogan>
Component: New BugsAssignee: David Grogan <dgrogan>
Status: RESOLVED FIXED    
Severity: Normal CC: dglazkov, hans, jsbell, levin+threading, michaeln, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch for landing
none
Patch
none
Patch for landing none

David Grogan
Reported 2011-11-29 20:06:30 PST
move data in IDBPendingTransactionMonitor from static to ThreadLocal
Attachments
Patch (4.78 KB, patch)
2011-11-29 20:32 PST, David Grogan
no flags
Patch for landing (5.06 KB, patch)
2011-11-29 21:00 PST, David Grogan
no flags
Patch (5.23 KB, patch)
2011-11-30 11:07 PST, David Grogan
no flags
Patch for landing (5.26 KB, patch)
2011-11-30 22:25 PST, David Grogan
no flags
David Grogan
Comment 1 2011-11-29 20:32:47 PST
David Grogan
Comment 2 2011-11-29 20:35:45 PST
Dave Levin, could you review this?
David Levin
Comment 3 2011-11-29 20:47:17 PST
Comment on attachment 117107 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=117107&action=review Feel free to address the items I mentioned and land it. > Source/WebCore/storage/IDBPendingTransactionMonitor.cpp:38 > + AtomicallyInitializedStatic(ThreadSpecific<Vector<IDBTransactionBackendInterface*> >*, transactions = new ThreadSpecific<Vector<IDBTransactionBackendInterface*> >); Note AtomicallyInitializedStatic takes a lock every time it is hit (every time you all transactions()). > Source/WebCore/storage/IDBPendingTransactionMonitor.cpp:49 > + size_t pos = transactions()->find(transaction); You should consider storing transactions() in a local variable to avoid hit the mutex so often (especially in the loop below, etc). > Source/WebCore/storage/IDBPendingTransactionMonitor.cpp:59 > + transactions()->at(i)->abort(); Shouldn't this also remove all of the items in addition to aborting them (transactions().clear())?
David Grogan
Comment 4 2011-11-29 20:59:37 PST
Comment on attachment 117107 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=117107&action=review >> Source/WebCore/storage/IDBPendingTransactionMonitor.cpp:49 >> + size_t pos = transactions()->find(transaction); > > You should consider storing transactions() in a local variable to avoid hit the mutex so often (especially in the loop below, etc). Done. >> Source/WebCore/storage/IDBPendingTransactionMonitor.cpp:59 >> + transactions()->at(i)->abort(); > > Shouldn't this also remove all of the items in addition to aborting them (transactions().clear())? Yes. Thanks for catching that.
David Grogan
Comment 5 2011-11-29 21:00:57 PST
Created attachment 117113 [details] Patch for landing
WebKit Review Bot
Comment 6 2011-11-30 05:59:40 PST
Comment on attachment 117113 [details] Patch for landing Rejecting attachment 117113 [details] from commit-queue. Failed to run "['/mnt/git/webkit-commit-queue/Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '-..." exit_code: 2 Last 500 characters of output: e Source/WebCore/storage/IDBPendingTransactionMonitor.cpp:59: error: expected primary-expression before '>' token Source/WebCore/storage/IDBPendingTransactionMonitor.cpp:59: error: 'transactionList' was not declared in this scope Source/WebCore/storage/IDBPendingTransactionMonitor.cpp:59: error: 'transactions' was not declared in this scope make: *** [out/Release/obj.target/webcore_remaining/Source/WebCore/storage/IDBPendingTransactionMonitor.o] Error 1 make: *** Waiting for unfinished jobs.... Full output: http://queues.webkit.org/results/10709161
WebKit Review Bot
Comment 7 2011-11-30 06:33:38 PST
Comment on attachment 117113 [details] Patch for landing Attachment 117113 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/10694169
David Grogan
Comment 8 2011-11-30 11:07:00 PST
WebKit Review Bot
Comment 9 2011-11-30 20:45:41 PST
Comment on attachment 117229 [details] Patch Attachment 117229 [details] did not pass chromium-ews (chromium-xvfb): Output: http://queues.webkit.org/results/10704436
David Grogan
Comment 10 2011-11-30 22:25:36 PST
Created attachment 117344 [details] Patch for landing
WebKit Review Bot
Comment 11 2011-11-30 23:59:30 PST
Comment on attachment 117344 [details] Patch for landing Clearing flags on attachment: 117344 Committed r101626: <http://trac.webkit.org/changeset/101626>
WebKit Review Bot
Comment 12 2011-11-30 23:59:35 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.