code review for CR7007254

Kelly O'Hair kelly.ohair at oracle.com
Tue Jan 4 12:26:05 PST 2011


I vaguely recall painful issues here. Since an agent comes in before  
the java classes can be used, you
are forced to use the Host OS native functionality to to character  
conversions to/from the platform encoding.
This was at least partially why the npt library came about.
Look for utf8FromPlatform and utf8ToPlatform

-kto

On Jan 4, 2011, at 12:15 PM, Tomas Hurka wrote:

> Hi Alan,
>
> On 4 Jan 2011, at 15:29, Tomas Hurka wrote:
>> On 4 Jan 2011, at 15:05, Alan Bateman wrote:
>>
>>> Tomas Hurka wrote:
>>>> Hello,
>>>> I would like to as for review of the fix for CR7007254 - A  
>>>> NullPointerException occurs with jvisualvm placed under a dir.  
>>>> including Japanese chars.
>>>>
>>>> Webrev: http://cr.openjdk.java.net/~thurka/7007254/webrev.00/
>>>>
>>> Tomas - I think the JVMTI spec is for the segment to be specified  
>>> in mUTF-8, in which case I wonder if the JPLIS agent needs changes.
>> You are right, AddToSystemClassLoaderSearch and  
>> AddToBootClassLoaderSearch should have segment in mUTF-8. In such  
>> case, the fix will be much more complicated. :-(
> One more thing. I found interesting comment in JPLISAgent.c function  
> appendToClassLoaderSearch(). See below:
> 	    /*
> 	     * JVMTI spec'ed to use modified UTF8. At this time this is not  
> implemented
>  	     * the platform encoding is used.
> 	     */
> And if you take a look at the code below this comment,  
> AddToSystemClassLoaderSearch (and AddToBootstrapClassLoaderSearch)  
> is invoked with path to jar file encoded in platform encoding. :-((
>
> Bye,
> --
> Tomas Hurka   <mailto:tomas.hurka at oracle.com>
> NetBeans Profiler http://profiler.netbeans.org
> VisualVM http://visualvm.dev.java.net
> Software Developer
> Oracle, Praha Czech Republic
>
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/serviceability-dev/attachments/20110104/3781fafa/attachment.html 


More information about the serviceability-dev mailing list