16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "jfr/jfrEvents.hpp"
27 #include "jfr/recorder/jfrRecorder.hpp"
28 #include "jfr/periodic/sampling/jfrCallTrace.hpp"
29 #include "jfr/periodic/sampling/jfrThreadSampler.hpp"
30 #include "jfr/recorder/service/jfrOptionSet.hpp"
31 #include "jfr/recorder/stacktrace/jfrStackTraceRepository.hpp"
32 #include "jfr/support/jfrThreadId.hpp"
33 #include "jfr/utilities/jfrTime.hpp"
34 #include "logging/log.hpp"
35 #include "runtime/frame.inline.hpp"
36 #include "runtime/os.hpp"
37 #include "runtime/semaphore.hpp"
38 #include "runtime/thread.inline.hpp"
39 #include "runtime/threadSMR.hpp"
40
41 enum JfrSampleType {
42 NO_SAMPLE = 0,
43 JAVA_SAMPLE = 1,
44 NATIVE_SAMPLE = 2
45 };
46
47 static bool thread_state_in_java(JavaThread* thread) {
48 assert(thread != NULL, "invariant");
49 switch(thread->thread_state()) {
50 case _thread_new:
51 case _thread_uninitialized:
52 case _thread_new_trans:
53 case _thread_in_vm_trans:
54 case _thread_blocked_trans:
55 case _thread_in_native_trans:
|
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "jfr/jfrEvents.hpp"
27 #include "jfr/recorder/jfrRecorder.hpp"
28 #include "jfr/periodic/sampling/jfrCallTrace.hpp"
29 #include "jfr/periodic/sampling/jfrThreadSampler.hpp"
30 #include "jfr/recorder/service/jfrOptionSet.hpp"
31 #include "jfr/recorder/stacktrace/jfrStackTraceRepository.hpp"
32 #include "jfr/support/jfrThreadId.hpp"
33 #include "jfr/utilities/jfrTime.hpp"
34 #include "logging/log.hpp"
35 #include "runtime/frame.inline.hpp"
36 #include "runtime/mutexLocker.inline.hpp"
37 #include "runtime/os.hpp"
38 #include "runtime/semaphore.hpp"
39 #include "runtime/thread.inline.hpp"
40 #include "runtime/threadSMR.hpp"
41
42 enum JfrSampleType {
43 NO_SAMPLE = 0,
44 JAVA_SAMPLE = 1,
45 NATIVE_SAMPLE = 2
46 };
47
48 static bool thread_state_in_java(JavaThread* thread) {
49 assert(thread != NULL, "invariant");
50 switch(thread->thread_state()) {
51 case _thread_new:
52 case _thread_uninitialized:
53 case _thread_new_trans:
54 case _thread_in_vm_trans:
55 case _thread_blocked_trans:
56 case _thread_in_native_trans:
|