<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hi,<br>
<br>
here is an updated version of this bug. In this version,
compilation IDs are generated by using Atomic::add(). <br>
As a result, we should not need locks to provide a unique ID for
each request.<br>
<br>
Also, in AdapterHandlerLibrary::create_native_wrapper(),
set_code() is now called while holding<br>
the AdapterHandlerLibrary_lock. This should be fine, since
set_code() does not use locks.<br>
<br>
Here is the updated webrev:<br>
<meta http-equiv="content-type" content="text/html;
charset=ISO-8859-1">
<a href="http://cr.openjdk.java.net/%7Eanoll/8022494/webrev.03/">http://cr.openjdk.java.net/~anoll/8022494/webrev.03/</a><br>
<br>
Many thanks in advance,<br>
Albert<br>
<br>
<br>
On 08.08.2013 04:26, Vladimir Kozlov wrote:<br>
</div>
<blockquote cite="mid:520301C5.20803@oracle.com" type="cite">I think
the simplest solution would be to make
CompileBroker::assign_compile_id() public (note, it is static
method) and call it from create_native_wrapper().
<br>
<br>
Vladimir
<br>
<br>
On 8/7/13 6:50 PM, John Rose wrote:
<br>
<blockquote type="cite">On Aug 6, 2013, at 10:55 PM, Albert Noll
<<a class="moz-txt-link-abbreviated" href="mailto:albert.noll@oracle.com">albert.noll@oracle.com</a>
<br>
<a class="moz-txt-link-rfc2396E" href="mailto:albert.noll@oracle.com"><mailto:albert.noll@oracle.com></a>> wrote:
<br>
<br>
<blockquote type="cite">please review this small patch.
<br>
</blockquote>
<br>
It looks like you moved the test (for NULL) of method->code()
outside of
<br>
AdapterHandlerLibrary_lock.
<br>
<br>
This means that there will be races where multiple threads race
to
<br>
request a native wrapper. They will all generate the code,
sequentially
<br>
grabbing AdapterHandlerLibrary_lock. I think this is
unnecessary
<br>
concurrency. I suggest that you keep the lines marked "See if
somebody
<br>
beat us to it".
<br>
<br>
— John
<br>
</blockquote>
</blockquote>
<br>
</body>
</html>