Mercurial > hg > truffle
diff src/share/vm/prims/jvm.cpp @ 11020:3a0774193f71
Merge
author | chegar |
---|---|
date | Wed, 19 Jun 2013 11:02:10 +0100 |
parents | eaf3742822ec f2110083203d |
children | 9f3e3245b50f |
line wrap: on
line diff
--- a/src/share/vm/prims/jvm.cpp Mon Jun 17 11:17:49 2013 +0100 +++ b/src/share/vm/prims/jvm.cpp Wed Jun 19 11:02:10 2013 +0100 @@ -59,6 +59,7 @@ #include "services/attachListener.hpp" #include "services/management.hpp" #include "services/threadService.hpp" +#include "trace/tracing.hpp" #include "utilities/copy.hpp" #include "utilities/defaultStream.hpp" #include "utilities/dtrace.hpp" @@ -3068,6 +3069,8 @@ millis); #endif /* USDT2 */ + EventThreadSleep event; + if (millis == 0) { // When ConvertSleepToYield is on, this matches the classic VM implementation of // JVM_Sleep. Critical for similar threading behaviour (Win32) @@ -3088,6 +3091,10 @@ // An asynchronous exception (e.g., ThreadDeathException) could have been thrown on // us while we were sleeping. We do not overwrite those. if (!HAS_PENDING_EXCEPTION) { + if (event.should_commit()) { + event.set_time(millis); + event.commit(); + } #ifndef USDT2 HS_DTRACE_PROBE1(hotspot, thread__sleep__end,1); #else /* USDT2 */ @@ -3101,6 +3108,10 @@ } thread->osthread()->set_state(old_state); } + if (event.should_commit()) { + event.set_time(millis); + event.commit(); + } #ifndef USDT2 HS_DTRACE_PROBE1(hotspot, thread__sleep__end,0); #else /* USDT2 */