equal
deleted
inserted
replaced
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(); |