You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Gregory Shimansky (JIRA)" <ji...@apache.org> on 2007/10/24 16:30:51 UTC

[jira] Created: (HARMONY-5015) [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references

[drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references
-----------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-5015
                 URL: https://issues.apache.org/jira/browse/HARMONY-5015
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
            Reporter: Gregory Shimansky
            Priority: Minor


Currently these two functions treat references as void* but this isn't true on x86_64 in compressed references mode (currently default). In this mode comparison with NULL has to be done with managed_null, and references have to be uncompressed when taken from JIT stack, compressed when put into JIT stack.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5015) [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references

Posted by "Ilya Berezhniuk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Berezhniuk updated HARMONY-5015:
-------------------------------------

    Attachment: Test.java
                Test.exp

I've created JVMTI test to check JIT behavior regarding local vars.
The test is in attachment.

The test shows following details:
1) JIT stores local variables of reference type as uncompressed references, even in compressed mode
2) In compressed mode JIT returns heap_base (managed_null) for null references

So JVMTI should check managed_null value instead of NULL when in compressed mode.
JIT function rt_get_local_var() should be corrected to operate with 64-bit values on x86_64.

I'm going to provide a patch for this soon.

> [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5015
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5015
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>            Priority: Minor
>         Attachments: Test.exp, Test.java
>
>
> Currently these two functions treat references as void* but this isn't true on x86_64 in compressed references mode (currently default). In this mode comparison with NULL has to be done with managed_null, and references have to be uncompressed when taken from JIT stack, compressed when put into JIT stack.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5015) [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references

Posted by "Mikhail Fursov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537877 ] 

Mikhail Fursov commented on HARMONY-5015:
-----------------------------------------

JIT part is OK.

> [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5015
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5015
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>            Priority: Minor
>         Attachments: H-5015.patch, test.cpp, Test.exp, Test.java
>
>
> Currently these two functions treat references as void* but this isn't true on x86_64 in compressed references mode (currently default). In this mode comparison with NULL has to be done with managed_null, and references have to be uncompressed when taken from JIT stack, compressed when put into JIT stack.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5015) [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references

Posted by "Ilya Berezhniuk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Berezhniuk updated HARMONY-5015:
-------------------------------------

    Attachment: test.cpp

Oops.. exp file is not a source

Attaching correct file

> [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5015
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5015
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>            Priority: Minor
>         Attachments: test.cpp, Test.exp, Test.java
>
>
> Currently these two functions treat references as void* but this isn't true on x86_64 in compressed references mode (currently default). In this mode comparison with NULL has to be done with managed_null, and references have to be uncompressed when taken from JIT stack, compressed when put into JIT stack.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-5015) [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky closed HARMONY-5015.
--------------------------------------


VERIFIED. Tests work for me now.

> [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5015
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5015
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>            Assignee: Gregory Shimansky
>            Priority: Minor
>         Attachments: H-5015.patch, test.cpp, Test.exp, Test.java
>
>
> Currently these two functions treat references as void* but this isn't true on x86_64 in compressed references mode (currently default). In this mode comparison with NULL has to be done with managed_null, and references have to be uncompressed when taken from JIT stack, compressed when put into JIT stack.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5015) [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references

Posted by "Ilya Berezhniuk (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537932 ] 

Ilya Berezhniuk commented on HARMONY-5015:
------------------------------------------

Thanks a lot, Mikhail!

Gregory, you can commit if the results are OK.

> [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5015
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5015
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>            Priority: Minor
>         Attachments: H-5015.patch, test.cpp, Test.exp, Test.java
>
>
> Currently these two functions treat references as void* but this isn't true on x86_64 in compressed references mode (currently default). In this mode comparison with NULL has to be done with managed_null, and references have to be uncompressed when taken from JIT stack, compressed when put into JIT stack.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5015) [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537405 ] 

Gregory Shimansky commented on HARMONY-5015:
--------------------------------------------

BTW the same algorithm has to be implemented for FieldModification event in jvmti_watch.cpp.  JIT passes jvalue pointer to the new value to the callback. In case of a reference, it has to be uncompressed.

> [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5015
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5015
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>            Priority: Minor
>
> Currently these two functions treat references as void* but this isn't true on x86_64 in compressed references mode (currently default). In this mode comparison with NULL has to be done with managed_null, and references have to be uncompressed when taken from JIT stack, compressed when put into JIT stack.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (HARMONY-5015) [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky resolved HARMONY-5015.
----------------------------------------

    Resolution: Fixed

Patch is applied at 588688.

> [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5015
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5015
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>            Assignee: Gregory Shimansky
>            Priority: Minor
>         Attachments: H-5015.patch, test.cpp, Test.exp, Test.java
>
>
> Currently these two functions treat references as void* but this isn't true on x86_64 in compressed references mode (currently default). In this mode comparison with NULL has to be done with managed_null, and references have to be uncompressed when taken from JIT stack, compressed when put into JIT stack.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5015) [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references

Posted by "Pavel Pervov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537528 ] 

Pavel Pervov commented on HARMONY-5015:
---------------------------------------

AFAIK, JIT's stack holds uncompressed references. JIT only decompress/compress references on get(static|field) and put(static|field) operations.

As for field modification watch - you may be right, but it need to be checked anyway.


> [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5015
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5015
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>            Priority: Minor
>
> Currently these two functions treat references as void* but this isn't true on x86_64 in compressed references mode (currently default). In this mode comparison with NULL has to be done with managed_null, and references have to be uncompressed when taken from JIT stack, compressed when put into JIT stack.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-5015) [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references

Posted by "Ilya Berezhniuk (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ilya Berezhniuk updated HARMONY-5015:
-------------------------------------

    Attachment: H-5015.patch

Here is the patch.

Gregory, please sheck the results. Looks like this patch actually fixes GetValuesTest, SetValuesTest and ThisObjectTest.

Also we probably need an approval from JIT guys for JIT part of this patch.

> [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5015
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5015
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>            Priority: Minor
>         Attachments: H-5015.patch, test.cpp, Test.exp, Test.java
>
>
> Currently these two functions treat references as void* but this isn't true on x86_64 in compressed references mode (currently default). In this mode comparison with NULL has to be done with managed_null, and references have to be uncompressed when taken from JIT stack, compressed when put into JIT stack.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-5015) [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-5015?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12537690 ] 

Gregory Shimansky commented on HARMONY-5015:
--------------------------------------------

In case JIT holds uncompressed references then function jit->get_local_var shouldn't return lower 32 bits of a void* pointer passed to it.  This is just a statement, it is not an argument with what Pavel wrote.

> [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5015
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5015
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>            Priority: Minor
>
> Currently these two functions treat references as void* but this isn't true on x86_64 in compressed references mode (currently default). In this mode comparison with NULL has to be done with managed_null, and references have to be uncompressed when taken from JIT stack, compressed when put into JIT stack.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (HARMONY-5015) [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-5015?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky reassigned HARMONY-5015:
------------------------------------------

    Assignee: Gregory Shimansky

> [drlvm][jvmti][x86_64] Functions jvmtiGetLocalObject and jvmtiSetLocalObject have to handle compressed references
> -----------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-5015
>                 URL: https://issues.apache.org/jira/browse/HARMONY-5015
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>            Reporter: Gregory Shimansky
>            Assignee: Gregory Shimansky
>            Priority: Minor
>         Attachments: H-5015.patch, test.cpp, Test.exp, Test.java
>
>
> Currently these two functions treat references as void* but this isn't true on x86_64 in compressed references mode (currently default). In this mode comparison with NULL has to be done with managed_null, and references have to be uncompressed when taken from JIT stack, compressed when put into JIT stack.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.