Bug 128570 - Removing limitation on JSLock’s lockDropDepth
Summary: Removing limitation on JSLock’s lockDropDepth
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Mark Lam
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-10 18:03 PST by Mark Lam
Modified: 2014-02-10 20:44 PST (History)
6 users (show)

See Also:


Attachments
the patch. (13.29 KB, patch)
2014-02-10 18:45 PST, Mark Lam
no flags Details | Formatted Diff | Diff
patch 2: fixed typos. (13.29 KB, patch)
2014-02-10 18:48 PST, Mark Lam
no flags Details | Formatted Diff | Diff
patch 3: rebased, and fixed more typo fails. (13.30 KB, patch)
2014-02-10 18:55 PST, Mark Lam
ggaren: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Lam 2014-02-10 18:03:42 PST
Now that we’ve switched to using the C stack, we no longer need to limit the lockDropDepth to 2.

For C loop builds which still uses the separate JSStack, The JSLock will enforce ordering for re-grabbing the lock after dropping it.  Ordering is achieved by JSLock::dropAllLocks() stashing away the JSLock:: m_lockDropDepth in its dropper’s DropAllLocks::m_dropDepth before unlocking the lock.  JSLock::grabAllLocks() will ensure that JSLocks::m_lockDropDepth equals its dropper’s DropAllLocks::m_dropDepth before allowing the lock to be re-grabbed.  Otherwise, it will yield and retry again later.
Comment 1 Mark Lam 2014-02-10 18:45:12 PST
Created attachment 223785 [details]
the patch.
Comment 2 Mark Lam 2014-02-10 18:47:22 PST
Comment on attachment 223785 [details]
the patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=223785&action=review

> Source/JavaScriptCore/ChangeLog:8
> +        Now that weâve switched to using the C stack, we no longer need to limit

Will fix the non-ascii character.

> Source/JavaScriptCore/ChangeLog:25
> +        JSLock, yield, and the relock it again later before retrying the check.

typo: “the relock” ==> “then relock”.
Comment 3 Mark Lam 2014-02-10 18:48:51 PST
Created attachment 223786 [details]
patch 2: fixed typos.
Comment 4 Mark Lam 2014-02-10 18:55:55 PST
Created attachment 223787 [details]
patch 3: rebased, and fixed more typo fails.
Comment 5 Geoffrey Garen 2014-02-10 20:37:02 PST
Comment on attachment 223787 [details]
patch 3: rebased, and fixed more typo fails.

View in context: https://bugs.webkit.org/attachment.cgi?id=223787&action=review

r=me

> Source/JavaScriptCore/runtime/JSLock.h:117
> +            friend class JSLock;

Let's make the accessor functions public instead of making JSLock a friend.
Comment 6 Mark Lam 2014-02-10 20:44:15 PST
Thanks for the review.  Landed in r163855: <http://trac.webkit.org/r163855>.