History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: RVM-445
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: David Grove
Reporter: Filip Pizlo
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
RVM

Clean up handling of JTOC

Created: 19/Apr/08 09:38 PM   Updated: 04/Jul/08 02:24 PM
Component/s: Runtime
Affects Version/s: 2.9.2
Fix Version/s: 3.0

Time Tracking:
Original Estimate: 2 days
Original Estimate - 2 days
Remaining Estimate: 2 days
Remaining Estimate - 2 days
Time Spent: Not Specified
Remaining Estimate - 2 days

File Attachments: 1. Text File fix_jtoc.patch (80 kb)
2. Text File soo.txt (0.5 kb)
3. Text File workinprogress4.patch (99 kb)

Issue Links:
Duplicate
 
Related


 Description  « Hide
Some code still assumes that the JTOC is not a constant. This adds noise to the code and creates confusion; as well, it can be an impediment when adding new code. In this improvement I will clean up the JTOC situation as much as possible, making it so that the native code assumes that it is a constant value that it acquires immediately upon loading, while the Java code has it as a baked-in constant. Notably, the baseline compiler on IA32 will no longer generate code to load the JTOC from the VM_Processor, and the VM_Processor will no longer have a JTOC field.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Ian Rogers - 19/Apr/08 10:05 PM

Ian Rogers - 19/Apr/08 10:16 PM

Ian Rogers - 19/Apr/08 10:20 PM
In the B2 compiler the registers are divided into being used for the stack, local variables and temporaries. Performing the copy elimination which is tracked by RVM-161.

Filip Pizlo - 19/Apr/08 10:29 PM
Hmmm. I hope that I didn't make things unnecessarily complicated by opening a new issue when there are others that are somewhat similar. But it should be noted that this issue is greater than just the baseline compiler - I'm also cleaning up other places (notably, the C and assembly code in tools/bootImageRunner) where the JTOC is being passed around unnecessarily given that the native code also at all times knows the JTOC anyway via a global variable. The baseline compiler fix that I will perform will be minor, and will likely not have a big impact on the work of RVM-161.

For me the bigger issue is that for my native threading prototype I found places where I'd either have to continue to humor the infrastructure by passing the JTOC as if it was variable, or I could just clean the system up and not have a variable JTOC. This patch-in-progress represents the latter.


Ian Rogers - 19/Apr/08 10:34 PM
I think it's a good idea to clean this up. It's been a long standing issue and we haven't cleaned it up other than in the compiler for B2. I just wanted to make sure it linked properly into all the issues we have and have had going for this.

Ian Rogers - 19/Apr/08 10:41 PM
An aside if you're cleaning up the C code is RVM-79, we're dumping the wrong floating point registers. We need to change the processing of the context to pick up the XMM registers instead/as well.

Filip Pizlo - 27/Apr/08 01:24 PM
Just an update ... I got this working on IA-32. Now I'm going to make sure that PPC is not broken. I include the current patch, in case anyone wants to see where I am so far.

Ian Rogers - 27/Apr/08 04:24 PM
Hi Filip, the patch is looking good! I wonder if there isn't a bit of creep coming into it though. For example, changing all the references in the x86 assembler of Offset to Address is distinct work from the valuable removal of the JTOC. Also, beware that some of the C interfaces are the way they are to help build on AIX. If you can help the person who will eventually apply the patch to the trunk by trying to make distinct patches it'd be appreciated. There are some notes in the wiki and doing local version management:
http://jikesrvm.org/Get+The+Source
As a SoC student you will be given write permissions to SVN branches, so this will also help.

Filip Pizlo - 27/Apr/08 09:06 PM
Separating the assembler changes is reasonable. I'll do that once I get the PPC side to work.

Filip Pizlo - 29/Apr/08 09:45 PM
Patches separated - a well-cooked patch on the assembler is submitted under RVM-469.

Filip Pizlo - 29/Apr/08 09:51 PM
Included is a seemingly working patch. It works on IA32 and PPC. Only tested on Linux, but I think I was careful with the AIX issues.

Filip Pizlo - 29/Apr/08 09:52 PM
NOTE: this patch will not work without the patch in RVM-469

David Grove - 15/May/08 04:06 PM
patch committed with minor adjustments due to code changes since patch submitted in r14228.

David Grove - 04/Jul/08 02:22 PM
reopening so I can modify fix target to 3.0