src/hotspot/share/jfr/recorder/service/jfrRecorderThreadLoop.cpp
branchJEP-349-branch
changeset 58567 e77a97d0edbb
parent 57360 5d043a159d5c
equal deleted inserted replaced
58540:43229acd75ea 58567:e77a97d0edbb
    38 void recorderthread_entry(JavaThread* thread, Thread* unused) {
    38 void recorderthread_entry(JavaThread* thread, Thread* unused) {
    39   assert(thread != NULL, "invariant");
    39   assert(thread != NULL, "invariant");
    40   #define START (msgs & (MSGBIT(MSG_START)))
    40   #define START (msgs & (MSGBIT(MSG_START)))
    41   #define SHUTDOWN (msgs & MSGBIT(MSG_SHUTDOWN))
    41   #define SHUTDOWN (msgs & MSGBIT(MSG_SHUTDOWN))
    42   #define ROTATE (msgs & (MSGBIT(MSG_ROTATE)|MSGBIT(MSG_STOP)))
    42   #define ROTATE (msgs & (MSGBIT(MSG_ROTATE)|MSGBIT(MSG_STOP)))
    43   #define FLUSHPOINT (msgs & (MSGBIT(MSG_FLUSHPOINT)|MSGBIT(MSG_FLUSHPOINT_METADATA)))
    43   #define FLUSHPOINT (msgs & (MSGBIT(MSG_FLUSHPOINT)))
    44   #define PROCESS_FULL_BUFFERS (msgs & (MSGBIT(MSG_ROTATE)|MSGBIT(MSG_STOP)|MSGBIT(MSG_FULLBUFFER)))
    44   #define PROCESS_FULL_BUFFERS (msgs & (MSGBIT(MSG_ROTATE)|MSGBIT(MSG_STOP)|MSGBIT(MSG_FULLBUFFER)))
    45   #define SCAVENGE (msgs & (MSGBIT(MSG_DEADBUFFER)))
    45   #define SCAVENGE (msgs & (MSGBIT(MSG_DEADBUFFER)))
    46 
    46 
    47   JfrPostBox& post_box = JfrRecorderThread::post_box();
    47   JfrPostBox& post_box = JfrRecorderThread::post_box();
    48   log_debug(jfr, system)("Recorder thread STARTED");
    48   log_debug(jfr, system)("Recorder thread STARTED");
    72       if (START) {
    72       if (START) {
    73         service.start();
    73         service.start();
    74       } else if (ROTATE) {
    74       } else if (ROTATE) {
    75         service.rotate(msgs);
    75         service.rotate(msgs);
    76       } else if (FLUSHPOINT) {
    76       } else if (FLUSHPOINT) {
    77         service.flush(msgs);
    77         service.flushpoint();
    78       }
    78       }
    79       JfrMsg_lock->lock();
    79       JfrMsg_lock->lock();
    80       post_box.notify_waiters();
    80       post_box.notify_waiters();
    81       if (SHUTDOWN) {
    81       if (SHUTDOWN) {
    82         log_debug(jfr, system)("Request to STOP recorder");
    82         log_debug(jfr, system)("Request to STOP recorder");