hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/concurrentMarkSweepThread.hpp
changeset 24424 2658d7834c6e
parent 24331 c0bc7e5653fb
child 27625 07829380b8cd
equal deleted inserted replaced
24358:8528b67f6562 24424:2658d7834c6e
     1 /*
     1 /*
     2  * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2001, 2014, 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.
   237       ts.update();
   237       ts.update();
   238     }
   238     }
   239     jio_snprintf(buf, sizeof(buf), " [%.3f:  CMSThread %s] ",
   239     jio_snprintf(buf, sizeof(buf), " [%.3f:  CMSThread %s] ",
   240                  ts.seconds(), desc);
   240                  ts.seconds(), desc);
   241     buf[sizeof(buf) - 1] = '\0';
   241     buf[sizeof(buf) - 1] = '\0';
   242     gclog_or_tty->print(buf);
   242     gclog_or_tty->print("%s", buf);
   243   }
   243   }
   244 }
   244 }
   245 
   245 
   246 // For scoped increment/decrement of (synchronous) yield requests
   246 // For scoped increment/decrement of (synchronous) yield requests
   247 class CMSSynchronousYieldRequest: public StackObj {
   247 class CMSSynchronousYieldRequest: public StackObj {
   269     _src(src), _msg(msg), _threshold(threshold), _ticks(0) { }
   269     _src(src), _msg(msg), _threshold(threshold), _ticks(0) { }
   270 
   270 
   271   inline void tick() {
   271   inline void tick() {
   272     _ticks++;
   272     _ticks++;
   273     if (CMSLoopWarn && _ticks % _threshold == 0) {
   273     if (CMSLoopWarn && _ticks % _threshold == 0) {
   274       warning("%s has looped %d times %s", _src, _ticks, _msg);
   274       warning("%s has looped " INTX_FORMAT " times %s", _src, _ticks, _msg);
   275     }
   275     }
   276   }
   276   }
   277 };
   277 };
   278 
   278 
   279 #endif // SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CONCURRENTMARKSWEEPTHREAD_HPP
   279 #endif // SHARE_VM_GC_IMPLEMENTATION_CONCURRENTMARKSWEEP_CONCURRENTMARKSWEEPTHREAD_HPP