src/share/vm/gc_implementation/shared/gcTrace.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/gc_implementation/shared

src/share/vm/gc_implementation/shared/gcTrace.cpp

Print this page




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  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 "gc_implementation/shared/gcHeapSummary.hpp"
  27 #include "gc_implementation/shared/gcTimer.hpp"
  28 #include "gc_implementation/shared/gcTrace.hpp"
  29 #include "gc_implementation/shared/promotionFailedInfo.hpp"
  30 #include "memory/referenceProcessorStats.hpp"
  31 #include "utilities/globalDefinitions.hpp"
  32 
  33 #define assert_unset_gc_id() assert(_shared_gc_info.id() == SharedGCInfo::UNSET_GCID, "GC already started?")
  34 #define assert_set_gc_id() assert(_shared_gc_info.id() != SharedGCInfo::UNSET_GCID, "GC not started?")
  35 
  36 static jlong GCTracer_next_gc_id = 0;
  37 static GCId create_new_gc_id() {
  38   return GCTracer_next_gc_id++;
  39 }
  40 
  41 void GCTracer::report_gc_start_impl(GCCause::Cause cause, jlong timestamp) {
  42   assert_unset_gc_id();
  43 
  44   GCId gc_id = create_new_gc_id();
  45   _shared_gc_info.set_id(gc_id);
  46   _shared_gc_info.set_cause(cause);
  47   _shared_gc_info.set_start_timestamp(timestamp);
  48 }
  49 




   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  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 "gc_implementation/shared/gcHeapSummary.hpp"
  27 #include "gc_implementation/shared/gcTimer.hpp"
  28 #include "gc_implementation/shared/gcTrace.hpp"
  29 #include "gc_implementation/shared/copyFailedInfo.hpp"
  30 #include "memory/referenceProcessorStats.hpp"
  31 #include "utilities/globalDefinitions.hpp"
  32 
  33 #define assert_unset_gc_id() assert(_shared_gc_info.id() == SharedGCInfo::UNSET_GCID, "GC already started?")
  34 #define assert_set_gc_id() assert(_shared_gc_info.id() != SharedGCInfo::UNSET_GCID, "GC not started?")
  35 
  36 static jlong GCTracer_next_gc_id = 0;
  37 static GCId create_new_gc_id() {
  38   return GCTracer_next_gc_id++;
  39 }
  40 
  41 void GCTracer::report_gc_start_impl(GCCause::Cause cause, jlong timestamp) {
  42   assert_unset_gc_id();
  43 
  44   GCId gc_id = create_new_gc_id();
  45   _shared_gc_info.set_id(gc_id);
  46   _shared_gc_info.set_cause(cause);
  47   _shared_gc_info.set_start_timestamp(timestamp);
  48 }
  49 


src/share/vm/gc_implementation/shared/gcTrace.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File