794 ProfilerNode* prev = table[index];
795 for(ProfilerNode* node = prev; node; node = node->next()) {
796 if (((vmNode *)node)->vm_match(name)) {
797 node->update(where);
798 return;
799 }
800 prev = node;
801 }
802 prev->set_next(new (this) vmNode(name, where));
803 }
804 }
805
806
807 class FlatProfilerTask : public PeriodicTask {
808 public:
809 FlatProfilerTask(int interval_time) : PeriodicTask(interval_time) {}
810 void task();
811 };
812
813 void FlatProfiler::record_vm_operation() {
814 if (Universe::heap()->is_gc_active()) {
815 FlatProfiler::received_gc_ticks += 1;
816 return;
817 }
818
819 if (DeoptimizationMarker::is_active()) {
820 FlatProfiler::deopt_ticks += 1;
821 return;
822 }
823
824 FlatProfiler::vm_operation_ticks += 1;
825 }
826
827 void FlatProfiler::record_vm_tick() {
828 // Profile the VM Thread itself if needed
829 // This is done without getting the Threads_lock and we can go deep
830 // inside Safepoint, etc.
831 if( ProfileVM ) {
832 ResourceMark rm;
833 ExtendedPC epc;
834 const char *name = NULL;
|
794 ProfilerNode* prev = table[index];
795 for(ProfilerNode* node = prev; node; node = node->next()) {
796 if (((vmNode *)node)->vm_match(name)) {
797 node->update(where);
798 return;
799 }
800 prev = node;
801 }
802 prev->set_next(new (this) vmNode(name, where));
803 }
804 }
805
806
807 class FlatProfilerTask : public PeriodicTask {
808 public:
809 FlatProfilerTask(int interval_time) : PeriodicTask(interval_time) {}
810 void task();
811 };
812
813 void FlatProfiler::record_vm_operation() {
814 if (GC::gc()->heap()->is_gc_active()) {
815 FlatProfiler::received_gc_ticks += 1;
816 return;
817 }
818
819 if (DeoptimizationMarker::is_active()) {
820 FlatProfiler::deopt_ticks += 1;
821 return;
822 }
823
824 FlatProfiler::vm_operation_ticks += 1;
825 }
826
827 void FlatProfiler::record_vm_tick() {
828 // Profile the VM Thread itself if needed
829 // This is done without getting the Threads_lock and we can go deep
830 // inside Safepoint, etc.
831 if( ProfileVM ) {
832 ResourceMark rm;
833 ExtendedPC epc;
834 const char *name = NULL;
|