Mercurial > hg > graal-compiler
comparison src/share/vm/runtime/java.cpp @ 10405:f2110083203d
8005849: JEP 167: Event-Based JVM Tracing
Reviewed-by: acorn, coleenp, sla
Contributed-by: Karen Kinnear <karen.kinnear@oracle.com>, Bengt Rutisson <bengt.rutisson@oracle.com>, Calvin Cheung <calvin.cheung@oracle.com>, Erik Gahlin <erik.gahlin@oracle.com>, Erik Helin <erik.helin@oracle.com>, Jesper Wilhelmsson <jesper.wilhelmsson@oracle.com>, Keith McGuigan <keith.mcguigan@oracle.com>, Mattias Tobiasson <mattias.tobiasson@oracle.com>, Markus Gronlund <markus.gronlund@oracle.com>, Mikael Auno <mikael.auno@oracle.com>, Nils Eliasson <nils.eliasson@oracle.com>, Nils Loodin <nils.loodin@oracle.com>, Rickard Backman <rickard.backman@oracle.com>, Staffan Larsen <staffan.larsen@oracle.com>, Stefan Karlsson <stefan.karlsson@oracle.com>, Yekaterina Kantserova <yekaterina.kantserova@oracle.com>
author | sla |
---|---|
date | Mon, 10 Jun 2013 11:30:51 +0200 |
parents | db9981fd3124 |
children | 836a62f43af9 71180a6e5080 |
comparison
equal
deleted
inserted
replaced
10404:d0add7016434 | 10405:f2110083203d |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
58 #include "runtime/timer.hpp" | 58 #include "runtime/timer.hpp" |
59 #include "runtime/vm_operations.hpp" | 59 #include "runtime/vm_operations.hpp" |
60 #include "services/memReporter.hpp" | 60 #include "services/memReporter.hpp" |
61 #include "services/memTracker.hpp" | 61 #include "services/memTracker.hpp" |
62 #include "trace/tracing.hpp" | 62 #include "trace/tracing.hpp" |
63 #include "trace/traceEventTypes.hpp" | |
64 #include "utilities/dtrace.hpp" | 63 #include "utilities/dtrace.hpp" |
65 #include "utilities/globalDefinitions.hpp" | 64 #include "utilities/globalDefinitions.hpp" |
66 #include "utilities/histogram.hpp" | 65 #include "utilities/histogram.hpp" |
67 #include "utilities/macros.hpp" | 66 #include "utilities/macros.hpp" |
68 #include "utilities/vmError.hpp" | 67 #include "utilities/vmError.hpp" |
526 | 525 |
527 if (JvmtiExport::should_post_thread_life()) { | 526 if (JvmtiExport::should_post_thread_life()) { |
528 JvmtiExport::post_thread_end(thread); | 527 JvmtiExport::post_thread_end(thread); |
529 } | 528 } |
530 | 529 |
531 EVENT_BEGIN(TraceEventThreadEnd, event); | 530 |
532 EVENT_COMMIT(event, | 531 EventThreadEnd event; |
533 EVENT_SET(event, javalangthread, java_lang_Thread::thread_id(thread->threadObj()))); | 532 if (event.should_commit()) { |
533 event.set_javalangthread(java_lang_Thread::thread_id(thread->threadObj())); | |
534 event.commit(); | |
535 } | |
534 | 536 |
535 // Always call even when there are not JVMTI environments yet, since environments | 537 // Always call even when there are not JVMTI environments yet, since environments |
536 // may be attached late and JVMTI must track phases of VM execution | 538 // may be attached late and JVMTI must track phases of VM execution |
537 JvmtiExport::post_vm_death(); | 539 JvmtiExport::post_vm_death(); |
538 Threads::shutdown_vm_agents(); | 540 Threads::shutdown_vm_agents(); |