Closed
Bug 536223
Opened 15 years ago
Closed 14 years ago
Code changes to make JIT working in Symbian avmshell
Categories
(Tamarin Graveyard :: Baseline JIT (CodegenLIR), defect)
Tracking
(Not tracked)
RESOLVED
FIXED
Future
People
(Reporter: skekki, Assigned: skekki)
References
Details
Attachments
(3 files, 23 obsolete files)
621 bytes,
patch
|
edwsmith
:
review+
|
Details | Diff | Splinter Review |
3.48 KB,
patch
|
skekki
:
review+
lhansen
:
superreview+
|
Details | Diff | Splinter Review |
6.05 KB,
patch
|
skekki
:
review+
|
Details | Diff | Splinter Review |
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB5; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 2.0.50727) Build Identifier: Patch against current FlashRuntime mainline (12/20/2009) Contains patches and new files. Reproducible: Always
Assignee | ||
Comment 1•15 years ago
|
||
Attachment #418678 -
Flags: review?(stejohns)
Assignee | ||
Comment 2•15 years ago
|
||
Attachment #418679 -
Flags: review?(stejohns)
Assignee | ||
Comment 3•15 years ago
|
||
Attachment #418680 -
Flags: review?(stejohns)
Assignee | ||
Comment 4•15 years ago
|
||
Attachment #418681 -
Flags: review?(stejohns)
Comment 5•15 years ago
|
||
Comment on attachment 418678 [details] [diff] [review] Patch to some files in MMgc folder. Tommy needs to review the operator-new stuff, Rick or Edwin for the code-memory.
Attachment #418678 -
Flags: review?(treilly)
Attachment #418678 -
Flags: review?(stejohns)
Attachment #418678 -
Flags: review?(rreitmai)
Updated•15 years ago
|
Attachment #418679 -
Attachment is patch: true
Updated•15 years ago
|
Attachment #418680 -
Attachment is patch: true
Assignee | ||
Comment 6•15 years ago
|
||
In addition, please also replace the whole MMgcPortSymbian.cpp with the attached file. The patch looked too big/error prone.
Attachment #418682 -
Flags: review?(stejohns)
Comment 7•15 years ago
|
||
Comment on attachment 418679 [details] [diff] [review] Patch to some files in nanojit folder. Changes to nanojit generally need to be review by someone at both Adobe and Mozilla.
Attachment #418679 -
Flags: review?(stejohns)
Attachment #418679 -
Flags: review?(rreitmai)
Attachment #418679 -
Flags: review?(nnethercote)
Comment 8•15 years ago
|
||
Comment on attachment 418680 [details] [diff] [review] Patch to some files in platform folder. delegating to Tommy because of MAP_TO_OS_NEW... otherwise looks fine to me
Attachment #418680 -
Flags: review?(stejohns) → review?(treilly)
Assignee | ||
Comment 9•15 years ago
|
||
Attachment #418683 -
Flags: review?(stejohns)
Assignee | ||
Comment 10•15 years ago
|
||
Attachment #418684 -
Flags: review?(stejohns)
Updated•15 years ago
|
Attachment #418681 -
Flags: review?(stejohns) → review-
Comment 11•15 years ago
|
||
Comment on attachment 418681 [details] [diff] [review] Patch to some files in shell folder. Rejecting solely because indentation style doesn't match rest of the file... please fix and resubmit. (Yes, we are picky about these things.)
Assignee | ||
Comment 12•15 years ago
|
||
Attachment #418685 -
Flags: review?(stejohns)
Updated•15 years ago
|
Attachment #418683 -
Flags: review?(stejohns) → review+
Assignee | ||
Comment 13•15 years ago
|
||
Attachment #418686 -
Flags: review?(stejohns)
Assignee | ||
Comment 14•15 years ago
|
||
Attachment #418687 -
Flags: review?(stejohns)
Comment 15•15 years ago
|
||
Comment on attachment 418682 [details] [diff] [review] Patch to some files in VMPI folder. Delegating to Rick due to the code-memory-allocation change.
Attachment #418682 -
Flags: review?(stejohns) → review?(rreitmai)
Updated•15 years ago
|
Attachment #418684 -
Attachment mime type: application/octet-stream → text/plain
Assignee | ||
Comment 16•15 years ago
|
||
Attachment #418688 -
Flags: review?(stejohns)
Updated•15 years ago
|
Attachment #418684 -
Flags: review?(stejohns) → review+
Updated•15 years ago
|
Attachment #418685 -
Attachment mime type: application/octet-stream → text/plain
Assignee | ||
Comment 17•15 years ago
|
||
Attachment #418689 -
Flags: review?(stejohns)
Updated•15 years ago
|
Attachment #418685 -
Flags: review?(stejohns) → review+
Updated•15 years ago
|
Attachment #418686 -
Attachment mime type: application/octet-stream → text/plain
Updated•15 years ago
|
Attachment #418686 -
Flags: review?(stejohns) → review+
Updated•15 years ago
|
Attachment #418687 -
Flags: review?(stejohns) → review+
Updated•15 years ago
|
Attachment #418688 -
Flags: review?(stejohns) → review-
Comment 18•15 years ago
|
||
Comment on attachment 418688 [details]
New file, please put under platform/symbian
We prefer not to check in code with permanently-commented-out chunks; this file has what appears to be two empty stubs. We should either check in working code or empty stubs.
Assignee | ||
Comment 19•15 years ago
|
||
Steven originally rejected a patch to this file. This should be better.
Attachment #418690 -
Flags: review?(stejohns)
Comment 20•15 years ago
|
||
Comment on attachment 418689 [details]
New file, please put under folder shell.
How can this code work? avmshell::Run is commented out.
Comment 21•15 years ago
|
||
Comment on attachment 418690 [details] [diff] [review] New version of this patch, now indentention is better. There's still gratuitous indentation change in unrelated code; review+ is conditional on ignoring those.
Attachment #418690 -
Flags: review?(stejohns) → review+
Assignee | ||
Comment 22•15 years ago
|
||
Steven rejected the original version of this file, this should help.
Attachment #418692 -
Flags: review?(stejohns)
Assignee | ||
Comment 23•15 years ago
|
||
(In reply to comment #20) > (From update of attachment 418689 [details]) > How can this code work? avmshell::Run is commented out. Hi Steven. Only the return value is commented out. Do you want that I clean up the file at that location?
Comment 24•15 years ago
|
||
Comment on attachment 418692 [details]
A new version of this file, now commented code has been removed.
Does your compiler complain about "unused parameters"? If so, might need to tweak this to prevent warnings.
Attachment #418692 -
Flags: review?(stejohns) → review+
Comment 25•15 years ago
|
||
Comment on attachment 418689 [details]
New file, please put under folder shell.
Ah, you are correct, my bad.
Attachment #418689 -
Flags: review?(stejohns) → review+
Assignee | ||
Comment 26•15 years ago
|
||
(In reply to comment #21) > (From update of attachment 418690 [details] [diff] [review]) > There's still gratuitous indentation change in unrelated code; review+ is > conditional on ignoring those. You are right, the patch looks bad. I try to produce a new one, unless you can use this.
Assignee | ||
Comment 27•15 years ago
|
||
(In reply to comment #24) > (From update of attachment 418692 [details]) > Does your compiler complain about "unused parameters"? If so, might need to > tweak this to prevent warnings. You are right, I do it right away.
Assignee | ||
Comment 28•15 years ago
|
||
Unused variable names are now commented out.
Attachment #418693 -
Flags: review?(stejohns)
Updated•15 years ago
|
Attachment #418693 -
Flags: review?(stejohns) → review+
Assignee | ||
Comment 29•15 years ago
|
||
No only my code additions are included in the patch.
Attachment #418694 -
Flags: review?(stejohns)
Updated•15 years ago
|
Attachment #418694 -
Attachment is patch: true
Updated•15 years ago
|
Attachment #418694 -
Flags: review?(stejohns) → review+
Comment 30•15 years ago
|
||
(In reply to comment #7) > (From update of attachment 418679 [details] [diff] [review]) > Changes to nanojit generally need to be review by someone at both Adobe and > Mozilla. Do they? Not according to https://developer.mozilla.org/en/NanojitMerge, at least not for NJ-only changes: "Review for a nanojit internal patch (no changes to external API or embedding assumptions) requires at least one member of either team. Review for a nanojit external patch (API changes or embedding / environment changes) requires sign off from at least one member of both teams." The "either team" wording isn't that clear, but given the following sentence I take it to mean that only one reviewer is necessary. Having said that, for larger NJ-only patches I think having a reviewer from each team is a good idea. I'm not a good person to review this patch, BTW, as I don't know much about ARM or the allocators. I'd suggest Graydon or Jacob.
Comment 31•15 years ago
|
||
(In reply to comment #30) > Do they? Not according to https://developer.mozilla.org/en/NanojitMerge, at > least not for NJ-only changes: I stand corrected.
Comment 32•15 years ago
|
||
CC'ing people from the other side is probably a good idea for all NJ changes.
Comment 33•15 years ago
|
||
Comment on attachment 418678 [details] [diff] [review] Patch to some files in MMgc folder. Not sure about the MAP_TO_OS_NEW define. I imagine we want to update avmfeatures.as and/or associated machinery once we start building tamarin symbian
Attachment #418678 -
Flags: review?(rreitmai) → review+
Comment 34•15 years ago
|
||
Comment on attachment 418679 [details] [diff] [review] Patch to some files in nanojit folder. it looks like we've made the #if more restrictive. What will be the case if ARMCC is not defined?
Comment 35•15 years ago
|
||
Comment on attachment 418682 [details] [diff] [review] Patch to some files in VMPI folder. I'm not sure how this is working, since CodeAlloc calls VMPI_SetPageProtection. I would instead suggest that you just leave the empty stubs. Also I'm wondering if the new VMPI api should be ifdef'd SYMBIAN? Requesting Lars to have a look; he may have suggestions on how to best factor this concept.
Attachment #418682 -
Flags: review?(lhansen)
Updated•15 years ago
|
Attachment #418679 -
Flags: review?(rreitmai) → review-
Assignee | ||
Comment 36•15 years ago
|
||
(In reply to comment #35) > (From update of attachment 418682 [details] [diff] [review]) > I'm not sure how this is working, since CodeAlloc calls VMPI_SetPageProtection. > I would instead suggest that you just leave the empty stubs. > Also I'm wondering if the new VMPI api should be ifdef'd SYMBIAN? > Requesting Lars to have a look; he may have suggestions on how to best factor > this concept. VMPI_SetPageProtection is moved to MMgcPortSymbian.cpp. There is an empty stub.
Assignee | ||
Comment 37•15 years ago
|
||
(In reply to comment #34) > (From update of attachment 418679 [details] [diff] [review]) > it looks like we've made the #if more restrictive. What will be the case if > ARMCC is not defined? In the else case there is the same code implemented in C. This intrinsic didn't compile with RVCT 2.2. However I didn't find a list of supported intrinsics in this compiler.
Assignee | ||
Comment 38•15 years ago
|
||
(In reply to comment #33) > (From update of attachment 418678 [details] [diff] [review]) > Not sure about the MAP_TO_OS_NEW define. > I imagine we want to update avmfeatures.as and/or associated machinery once we > start building tamarin symbian Good catch. I think it should be defined in avmhost-features.h (Flash Player file) instead of symbian-platform.h.
Comment 39•15 years ago
|
||
Comment on attachment 418682 [details] [diff] [review] Patch to some files in VMPI folder. I do not like the documentation for VMPI_allocCodeMemory - writable executable memory is a really bad idea, so to specify that it's impossible to change the page protection on memory allocated using this call seems wrong. More appropriate would be to state that VMPI_setPageProtection may have no effect, but that's probably true anyway (IMO it's a bug that the docs of that function aren't better than they are). On some platforms it may be necessary to use VMPI_allocCodeMemory but on those platforms it may also be possible to use VMPI_setPageProtection; it seems unreasonable to prevent this from working. I would approve it with those changes and changes to the VMPI_setPageProtection documentation, except that this API needs to be factored as a separate patch (including how it ties into the rest of the VM) and needs to be reviewed by Edwin at least. VMPI_ changes are too important to be buried inside other concerns.
Attachment #418682 -
Flags: review?(lhansen) → review-
Comment 40•15 years ago
|
||
Comment on attachment 418678 [details] [diff] [review] Patch to some files in MMgc folder. Why do we need MAP_TO_OS_NEW exactly and what does it have to do with getting the JIT to work?
Attachment #418678 -
Flags: review?(treilly) → review-
Comment 41•15 years ago
|
||
Comment on attachment 418680 [details] [diff] [review] Patch to some files in platform folder. is __GNUC__ not defined on symbian or something? Still looking for explanation of MAP_TO_OS_NEW...
Comment 42•15 years ago
|
||
Comment on attachment 418680 [details] [diff] [review] Patch to some files in platform folder. is __GNUC__ not defined on symbian or something? Still looking for explanation of MAP_TO_OS_NEW...
Attachment #418680 -
Flags: review?(treilly) → review-
Assignee | ||
Comment 43•15 years ago
|
||
(In reply to comment #40) > (From update of attachment 418678 [details] [diff] [review]) > Why do we need MAP_TO_OS_NEW exactly and what does it have to do with getting > the JIT to work? Hi Thomas. If MMGC_OVERRIDE_GLOBAL_NEW is defined MMgc wants to override global new operator. You can not do that on Symbian. MAP_TO_OS_NEW is to prevent MMgc from overriding global new. It is not required if MMGC_OVERRIDE_GLOBAL_NEW is not defined. It is not related to JIT, just to make avm work at all.
Assignee | ||
Comment 44•15 years ago
|
||
(In reply to comment #42) > (From update of attachment 418680 [details] [diff] [review]) > is __GNUC__ not defined on symbian or something? Still looking for explanation > of MAP_TO_OS_NEW... You are right, gcc is not used in Symbian tool chain.
Assignee | ||
Comment 45•15 years ago
|
||
(In reply to comment #43) > (In reply to comment #40) > > (From update of attachment 418678 [details] [diff] [review] [details]) > > Why do we need MAP_TO_OS_NEW exactly and what does it have to do with getting > > the JIT to work? > > Hi Thomas. If MMGC_OVERRIDE_GLOBAL_NEW is defined MMgc wants to override global > new operator. You can not do that on Symbian. MAP_TO_OS_NEW is to prevent MMgc > from overriding global new. It is not required if MMGC_OVERRIDE_GLOBAL_NEW is > not defined. > > It is not related to JIT, just to make avm work at all. Please let me know if there is a more elegant way of doing this. I'm always happy to clean up the code.
Comment 46•15 years ago
|
||
(In reply to comment #43) > (In reply to comment #40) > > (From update of attachment 418678 [details] [diff] [review] [details]) > > Why do we need MAP_TO_OS_NEW exactly and what does it have to do with getting > > the JIT to work? > > Hi Thomas. If MMGC_OVERRIDE_GLOBAL_NEW is defined MMgc wants to override global > new operator. You can not do that on Symbian. MAP_TO_OS_NEW is to prevent MMgc > from overriding global new. It is not required if MMGC_OVERRIDE_GLOBAL_NEW is > not defined. > > It is not related to JIT, just to make avm work at all. If that's the case, then would not the simpler solution be #ifdef MMGC_OVERRIDE_GLOBAL_NEW #error "configuration not supported" #endif in symbian-platform.h? (There's been some discussion about whether MMGC_OVERRIDE_GLOBAL_NEW is a good idea, and whether it's needed now that we have the memory allocation macros. I don't think that discussion is finished yet.)
Assignee | ||
Comment 47•15 years ago
|
||
Until very recently the memory allocation macros were not in place in Symbian build so I had to make the "old" code path to work also. But yes, most likely supporting MMGC_OVERRIDE_GLOBAL_NEW is not needed anymore on Symbian either, unless you want to compare the behavior between the two builds (memory macros on and off).
Assignee | ||
Comment 48•15 years ago
|
||
To summarise this review, I should * remove MAP_TO_OS_NEW feature as Tom suggested * change comments in VMPI.h as Lars suggested * create a new patch that contains the new function in VMPI API and also all vm files that uses that API for Edwin's review Then it's good to go?
Assignee | ||
Updated•15 years ago
|
Attachment #418681 -
Attachment is obsolete: true
Assignee | ||
Updated•15 years ago
|
Attachment #418688 -
Attachment is obsolete: true
Assignee | ||
Updated•15 years ago
|
Attachment #418692 -
Attachment is obsolete: true
Assignee | ||
Updated•15 years ago
|
Attachment #418690 -
Attachment is obsolete: true
Assignee | ||
Comment 49•15 years ago
|
||
(In reply to comment #34) > (From update of attachment 418679 [details] [diff] [review]) > it looks like we've made the #if more restrictive. What will be the case if > ARMCC is not defined? Hi Rick, do you think this change is OK? Originally you submitted Review-. Then I replied to your comment.
Comment 50•15 years ago
|
||
I see 4 patches that have been -'d, which means that once you've addressed the issues you'll need to re-submit the patches and have them reviewed by those that -'d or are still pending.
Assignee | ||
Comment 51•15 years ago
|
||
Attachment #418678 -
Attachment is obsolete: true
Attachment #420755 -
Flags: review?(treilly)
Assignee | ||
Comment 52•15 years ago
|
||
Attachment #418679 -
Attachment is obsolete: true
Attachment #420756 -
Flags: review?(treilly)
Attachment #418679 -
Flags: review?(nnethercote)
Assignee | ||
Comment 53•15 years ago
|
||
Attachment #418680 -
Attachment is obsolete: true
Attachment #420757 -
Flags: review?(treilly)
Assignee | ||
Comment 54•15 years ago
|
||
Attachment #418682 -
Attachment is obsolete: true
Attachment #420759 -
Flags: review?(treilly)
Attachment #418682 -
Flags: review?(rreitmai)
Assignee | ||
Comment 55•15 years ago
|
||
(In reply to comment #50) > I see 4 patches that have been -'d, which means that once you've addressed the > issues you'll need to re-submit the patches and have them reviewed by those > that -'d or are still pending. Thanks for the tip Rick. Could you please review patch below because you -'d it originally. It's memory related so I put Thomas to review it. https://bug536223.bugzilla.mozilla.org/attachment.cgi?id=420756
Updated•15 years ago
|
Attachment #420757 -
Flags: review?(treilly) → review+
Updated•15 years ago
|
Attachment #420755 -
Flags: review?(treilly) → review+
Comment 56•15 years ago
|
||
Comment on attachment 420756 [details] [diff] [review] Changes for handling JIT memory on Symbian plus a compilation fix deferring my review to edwin since this is nj code
Attachment #420756 -
Flags: review?(treilly) → superreview?(edwsmith)
Comment 57•15 years ago
|
||
Comment on attachment 420759 [details] [diff] [review] Adds new code memory allocation API that is used only on Symbian for now. generally I'd expect to see the implementations of this new API in the same patch as the definition. Where are they?
Attachment #420759 -
Flags: review?(treilly) → review-
Updated•15 years ago
|
Attachment #420756 -
Flags: superreview?(edwsmith) → superreview+
Comment 58•15 years ago
|
||
It seems odd to have VMPI_allocCodeMemory (an abstraction) which is only used on one platform. If Lars and Tommy are okay with this, then so am I, but it seems odd. Where is the patch that contains the Symbian specific implementation of VMPI_allocCodeMemory? The only thing I see above was the patch that supported ICACHE flushing.
Assignee | ||
Comment 59•15 years ago
|
||
Hi Edwin, it is in MMgcPortSymbian.cpp. I decided to put all memory related functionality there. As Lars already suggested earlier, I can open a new bug/create a new patch that only has all the files that have VMPI_allocCodeMemory in them but nothing more. https://bugzilla.mozilla.org/attachment.cgi?id=418683&action=edit
Assignee: nobody → skekki
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: flashplayer-qrb+
Priority: -- → P2
Target Milestone: --- → flash10.1
Comment 60•14 years ago
|
||
Attachment #418683 -
Attachment is obsolete: true
Attachment #418684 -
Attachment is obsolete: true
Attachment #418685 -
Attachment is obsolete: true
Attachment #418686 -
Attachment is obsolete: true
Attachment #418687 -
Attachment is obsolete: true
Attachment #418689 -
Attachment is obsolete: true
Attachment #418693 -
Attachment is obsolete: true
Attachment #418694 -
Attachment is obsolete: true
Attachment #420755 -
Attachment is obsolete: true
Attachment #420756 -
Attachment is obsolete: true
Attachment #420757 -
Attachment is obsolete: true
Attachment #420759 -
Attachment is obsolete: true
Attachment #426144 -
Flags: review?(edwsmith)
Comment 61•14 years ago
|
||
Comment 62•14 years ago
|
||
Comment 63•14 years ago
|
||
Attachment #426145 -
Attachment is obsolete: true
Attachment #427480 -
Flags: superreview?(lhansen)
Attachment #427480 -
Flags: review?(skekki)
Updated•14 years ago
|
Attachment #427480 -
Flags: superreview?(lhansen) → superreview+
Updated•14 years ago
|
Attachment #426144 -
Flags: review?(edwsmith) → review+
Assignee | ||
Comment 64•14 years ago
|
||
Previous version removed some code that it was not supposed to.
Attachment #429205 -
Flags: review?(rreitmai)
Assignee | ||
Comment 65•14 years ago
|
||
Hi Rick. I tried to make mmgc-v1 patch obsolete but got a message that I was not allowed to edit the bug. I sent a new patch that should replace mmgc-v1.
Updated•14 years ago
|
Attachment #426146 -
Attachment is obsolete: true
Comment 66•14 years ago
|
||
- adds comment to non virtual mem sample code and provides ifdefs around it. - convert all tabs to spaces
Attachment #427480 -
Attachment is obsolete: true
Attachment #429205 -
Attachment is obsolete: true
Attachment #429263 -
Flags: review?(skekki)
Attachment #429205 -
Flags: review?(rreitmai)
Attachment #427480 -
Flags: review?(skekki)
Updated•14 years ago
|
Attachment #426145 -
Attachment is obsolete: false
Updated•14 years ago
|
Attachment #427480 -
Attachment is obsolete: false
Updated•14 years ago
|
Attachment #426145 -
Attachment is obsolete: true
Updated•14 years ago
|
Attachment #427480 -
Flags: review?(skekki)
Updated•14 years ago
|
Target Milestone: flash10.1 → flash10.1.1
Assignee | ||
Updated•14 years ago
|
Attachment #427480 -
Flags: review?(skekki) → review+
Assignee | ||
Updated•14 years ago
|
Attachment #429263 -
Flags: review?(skekki) → review+
Comment 67•14 years ago
|
||
Now that bug 545295 has landed, can we proceed landing these changes?
Assignee | ||
Comment 68•14 years ago
|
||
SymbianPortUtils.cpp was changed by bug 545295, you may not be able to land that patch as is.
Updated•14 years ago
|
Component: Virtual Machine → JIT Compiler (NanoJIT)
QA Contact: vm → nanojit
Assignee | ||
Comment 69•14 years ago
|
||
The milestone for this bug can be set "Future".
Comment 70•14 years ago
|
||
Marking fixed, lets open a new bug with any remaining specific changes needed.
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•