src/hotspot/share/jfr/recorder/service/jfrRecorderThreadLoop.cpp
changeset 54623 1126f0607c70
parent 50113 caf115bb98ad
child 57360 5d043a159d5c
child 58863 c16ac7a2eba4
equal deleted inserted replaced
54622:a8dcacf95bff 54623:1126f0607c70
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2019, 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.
    48 
    48 
    49   {
    49   {
    50     bool done = false;
    50     bool done = false;
    51     int msgs = 0;
    51     int msgs = 0;
    52     JfrRecorderService service;
    52     JfrRecorderService service;
    53     MutexLockerEx msg_lock(JfrMsg_lock);
    53     MutexLocker msg_lock(JfrMsg_lock);
    54 
    54 
    55     // JFR MESSAGE LOOP PROCESSING - BEGIN
    55     // JFR MESSAGE LOOP PROCESSING - BEGIN
    56     while (!done) {
    56     while (!done) {
    57       if (post_box.is_empty()) {
    57       if (post_box.is_empty()) {
    58         JfrMsg_lock->wait(false);
    58         JfrMsg_lock->wait();
    59       }
    59       }
    60       msgs = post_box.collect();
    60       msgs = post_box.collect();
    61       JfrMsg_lock->unlock();
    61       JfrMsg_lock->unlock();
    62       if (PROCESS_FULL_BUFFERS) {
    62       if (PROCESS_FULL_BUFFERS) {
    63         service.process_full_buffers();
    63         service.process_full_buffers();