Closed
Bug 105476
Opened 24 years ago
Closed 24 years ago
Add ASM version of js_CompareAndSwap for OS/2
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
People
(Reporter: mkaply, Assigned: khanson)
Details
Attachments
(3 files)
|
3.39 KB,
patch
|
Details | Diff | Splinter Review | |
|
3.96 KB,
patch
|
Details | Diff | Splinter Review | |
|
4.07 KB,
patch
|
brendan
:
superreview+
|
Details | Diff | Splinter Review |
Our performance team has determined that js_CompareAndSwap
calling PR_Lock and PR_Unlock is a performance issue.
I am adding an ASM version for OS/2.
Note OS/2 does not have inline assembly, so I have to add
an ASM file. It is in the diff.
| Reporter | ||
Comment 1•24 years ago
|
||
i'd imagine the file should be MPL not NPL, but i could be wrong. Am i?
| Reporter | ||
Comment 4•24 years ago
|
||
I couldn't decide.
The ASM in the file is derivative of the Windows ASM in jslock.c which is an NPL
file.
Does that matter?
Comment 5•24 years ago
|
||
If it's a derivative of an NPL file, it should be tri-licensed, as the NPL file
should also be tri-licensed - we just haven't yet got a script smart enough to
do it automatically for us ;-)
The license policy states that new files which are derivatives of any code even
partly licensed under the NPL should be triple-licensed.
Gerv
Comment 6•24 years ago
|
||
What does your confusing phrase "even partly licensed under the NPL" mean, exactly?
Comment 7•24 years ago
|
||
I mean NPL, NPL/GPL, NPL/LGPL, NPL/MPL, NPL/LGPL/GPL, or any other combination
under the sun which includes the NPL.
Gerv
| Reporter | ||
Comment 8•24 years ago
|
||
I guess I'll put it under the MPL then because we don't have a process for the
other.
Comment 9•24 years ago
|
||
mkaply, it's not legal to put it under the MPL. If it's derived from an NPLed
file, you can't just relicense it. I know this sucks, but it's true. You can
either license it under the NPL, in which case when we relicense files of that
type it'll get tri-licensed, or you can tri-license it to start with and save us
the bother :-)
Gerv
Comment 10•24 years ago
|
||
Do we have a way of indicating where original code came from? for new files we
have Original Code: <authorname> or Contributors: <authorname> (Original Code),
and Orginal Code is ..., perhaps it would be nice to have Original Code:
<cvspathname>?
... sorry to cause so much spam over 2 letters.
Comment 11•24 years ago
|
||
No, we don't. You may, however, wish to copy the Contributors: section, if there
is one, out of the old file.
Gerv
| Reporter | ||
Comment 12•24 years ago
|
||
Comment 13•24 years ago
|
||
mkaply: how can I make this more clear? :-)
You have two choices.
- If you believe the code contains none of the original NPL-ed file, you must
license the code under the MPL tri-license, in accordance with the mozilla.org
licensing policy for completely new files.
http://www.mozilla.org/MPL/license-policy.html
- If you believe the code contains some of the original NPL-ed file, the
derivative work may be either NPL-ed, in which case we will NPL tri-license it
later, or you can skip straight to using the NPL tri-license.
Gerv
| Reporter | ||
Comment 14•24 years ago
|
||
OK now you have managed to utterly confuse me.
Why are there files in the tree that are MPL/GPL and not MPL/GPL/LGPL?
| Reporter | ||
Comment 15•24 years ago
|
||
Comment 16•24 years ago
|
||
> Why are there files in the tree that are MPL/GPL and not MPL/GPL/LGPL?
Because they were originally licensed that way, and we have not yet obtained the
copyright holders' permission to change them :-)
On that note, expect a mass email from me sometime tonight (probably) about
that. :-)
Gerv
Comment 17•24 years ago
|
||
Comment on attachment 55822 [details] [diff] [review]
I get it now, I really do - triple license ASM file plus diff
Thanks, only one really picky nit:
!( (defined(_WIN32) && defined(_M_IX86)) || \
(defined(__GNUC__) && defined(__i386__)) || \
(defined(SOLARIS) && defined(sparc) && defined(ULTRA_SPARC)) || \
- defined(AIX) )
+ defined(AIX) || defined(XP_OS2_VACPP))
See the extra space after '(AIX)' in 'defined(AIX) )' in the minus line?
Restore that to match the space after the opening paren of the ! operand,
and sr=brendan@mozilla.org.
/be
Attachment #55822 -
Flags: superreview+
Comment 18•24 years ago
|
||
mkaply: please confirm that, with the fix to bug 105571 (checked in on 10/19),
you don't see very many calls to js_CompareAndSwap. If you do, I'm interested
in the stack backtraces, and the classes of JS objects (or what code created them).
/be
Comment 19•24 years ago
|
||
Brendan, I agree, most of the compareandswap come from js_GetSlotThreadSafe, so
when we get up to 0.96 then this bit of asm be less needed. On the other hand,
I think secondary benefit is it puts os/2 on the more common #ifndef NSPR_LOCK
code path through the jslock code.
Sam
| Reporter | ||
Comment 20•24 years ago
|
||
Fix checked in.
I'll have our performance team run with a current build and see if they see as
much js_CompareAndSwap in the traces as they used to before 105571
Status: NEW → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 21•24 years ago
|
||
Has the performance analysis been successful? I don't have OS/2
to verify this bug; thanks -
Comment 22•24 years ago
|
||
Is this OK now on 0S/2? If I don't hear otherwise, I'm going to
mark this one Verified soon...
| Reporter | ||
Comment 23•24 years ago
|
||
We're good. I don't have numbers yet though.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•