hotspot/src/share/vm/runtime/vmThread.cpp
changeset 37176 663bdc7d0b86
parent 36384 b0b41336a9a8
child 38074 8475fdc6dcc3
equal deleted inserted replaced
37175:ac6850d71f72 37176:663bdc7d0b86
    30 #include "oops/oop.inline.hpp"
    30 #include "oops/oop.inline.hpp"
    31 #include "oops/verifyOopClosure.hpp"
    31 #include "oops/verifyOopClosure.hpp"
    32 #include "runtime/interfaceSupport.hpp"
    32 #include "runtime/interfaceSupport.hpp"
    33 #include "runtime/mutexLocker.hpp"
    33 #include "runtime/mutexLocker.hpp"
    34 #include "runtime/os.hpp"
    34 #include "runtime/os.hpp"
       
    35 #include "runtime/safepoint.hpp"
    35 #include "runtime/thread.inline.hpp"
    36 #include "runtime/thread.inline.hpp"
    36 #include "runtime/vmThread.hpp"
    37 #include "runtime/vmThread.hpp"
    37 #include "runtime/vm_operations.hpp"
    38 #include "runtime/vm_operations.hpp"
    38 #include "services/runtimeService.hpp"
    39 #include "services/runtimeService.hpp"
    39 #include "trace/tracing.hpp"
    40 #include "trace/tracing.hpp"
   350     EventExecuteVMOperation event;
   351     EventExecuteVMOperation event;
   351 
   352 
   352     op->evaluate();
   353     op->evaluate();
   353 
   354 
   354     if (event.should_commit()) {
   355     if (event.should_commit()) {
   355       bool is_concurrent = op->evaluate_concurrently();
   356       const bool is_concurrent = op->evaluate_concurrently();
       
   357       const bool evaluate_at_safepoint = op->evaluate_at_safepoint();
   356       event.set_operation(op->type());
   358       event.set_operation(op->type());
   357       event.set_safepoint(op->evaluate_at_safepoint());
   359       event.set_safepoint(evaluate_at_safepoint);
   358       event.set_blocking(!is_concurrent);
   360       event.set_blocking(!is_concurrent);
   359       // Only write caller thread information for non-concurrent vm operations.
   361       // Only write caller thread information for non-concurrent vm operations.
   360       // For concurrent vm operations, the thread id is set to 0 indicating thread is unknown.
   362       // For concurrent vm operations, the thread id is set to 0 indicating thread is unknown.
   361       // This is because the caller thread could have exited already.
   363       // This is because the caller thread could have exited already.
   362       event.set_caller(is_concurrent ? 0 : THREAD_TRACE_ID(op->calling_thread()));
   364       event.set_caller(is_concurrent ? 0 : THREAD_TRACE_ID(op->calling_thread()));
       
   365       event.set_safepointId(evaluate_at_safepoint ? SafepointSynchronize::safepoint_counter() : 0);
   363       event.commit();
   366       event.commit();
   364     }
   367     }
   365 
   368 
   366     HOTSPOT_VMOPS_END(
   369     HOTSPOT_VMOPS_END(
   367                      (char *) op->name(), strlen(op->name()),
   370                      (char *) op->name(), strlen(op->name()),