29 #include "interpreter/oopMapCache.hpp"
30 #include "memory/generation.hpp"
31 #include "memory/permGen.hpp"
32 #include "memory/resourceArea.hpp"
33 #include "runtime/handles.inline.hpp"
34 #include "runtime/jniHandles.hpp"
35 #include "runtime/memprofiler.hpp"
36 #include "runtime/mutexLocker.hpp"
37 #include "runtime/os.hpp"
38 #include "runtime/task.hpp"
39 #include "runtime/vmThread.hpp"
40 #ifdef TARGET_OS_FAMILY_linux
41 # include "thread_linux.inline.hpp"
42 #endif
43 #ifdef TARGET_OS_FAMILY_solaris
44 # include "thread_solaris.inline.hpp"
45 #endif
46 #ifdef TARGET_OS_FAMILY_windows
47 # include "thread_windows.inline.hpp"
48 #endif
49
50 #ifndef PRODUCT
51
52 // --------------------------------------------------------
53 // MemProfilerTask
54
55 class MemProfilerTask : public PeriodicTask {
56 public:
57 MemProfilerTask(int interval_time) : PeriodicTask(interval_time) {}
58 void task();
59 };
60
61
62 void MemProfilerTask::task() {
63 // Get thread lock to provide mutual exclusion, and so we can iterate safely over the thread list.
64 MutexLocker mu(Threads_lock);
65 MemProfiler::do_trace();
66 }
67
68
|
29 #include "interpreter/oopMapCache.hpp"
30 #include "memory/generation.hpp"
31 #include "memory/permGen.hpp"
32 #include "memory/resourceArea.hpp"
33 #include "runtime/handles.inline.hpp"
34 #include "runtime/jniHandles.hpp"
35 #include "runtime/memprofiler.hpp"
36 #include "runtime/mutexLocker.hpp"
37 #include "runtime/os.hpp"
38 #include "runtime/task.hpp"
39 #include "runtime/vmThread.hpp"
40 #ifdef TARGET_OS_FAMILY_linux
41 # include "thread_linux.inline.hpp"
42 #endif
43 #ifdef TARGET_OS_FAMILY_solaris
44 # include "thread_solaris.inline.hpp"
45 #endif
46 #ifdef TARGET_OS_FAMILY_windows
47 # include "thread_windows.inline.hpp"
48 #endif
49 #ifdef TARGET_OS_FAMILY_bsd
50 # include "thread_bsd.inline.hpp"
51 #endif
52
53 #ifndef PRODUCT
54
55 // --------------------------------------------------------
56 // MemProfilerTask
57
58 class MemProfilerTask : public PeriodicTask {
59 public:
60 MemProfilerTask(int interval_time) : PeriodicTask(interval_time) {}
61 void task();
62 };
63
64
65 void MemProfilerTask::task() {
66 // Get thread lock to provide mutual exclusion, and so we can iterate safely over the thread list.
67 MutexLocker mu(Threads_lock);
68 MemProfiler::do_trace();
69 }
70
71
|