equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2012, 2018, 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. |
23 */ |
23 */ |
24 |
24 |
25 #ifndef SHARE_VM_GC_SHARED_COPYFAILEDINFO_HPP |
25 #ifndef SHARE_VM_GC_SHARED_COPYFAILEDINFO_HPP |
26 #define SHARE_VM_GC_SHARED_COPYFAILEDINFO_HPP |
26 #define SHARE_VM_GC_SHARED_COPYFAILEDINFO_HPP |
27 |
27 |
|
28 #include "jfr/support/jfrThreadId.hpp" |
28 #include "runtime/thread.hpp" |
29 #include "runtime/thread.hpp" |
29 #include "trace/traceMacros.hpp" |
|
30 #include "utilities/globalDefinitions.hpp" |
30 #include "utilities/globalDefinitions.hpp" |
31 |
31 |
32 class CopyFailedInfo : public CHeapObj<mtGC> { |
32 class CopyFailedInfo : public CHeapObj<mtGC> { |
33 size_t _first_size; |
33 size_t _first_size; |
34 size_t _smallest_size; |
34 size_t _smallest_size; |
70 PromotionFailedInfo() : CopyFailedInfo(), _thread_trace_id(0) {} |
70 PromotionFailedInfo() : CopyFailedInfo(), _thread_trace_id(0) {} |
71 |
71 |
72 void register_copy_failure(size_t size) { |
72 void register_copy_failure(size_t size) { |
73 CopyFailedInfo::register_copy_failure(size); |
73 CopyFailedInfo::register_copy_failure(size); |
74 if (_thread_trace_id == 0) { |
74 if (_thread_trace_id == 0) { |
75 _thread_trace_id = THREAD_TRACE_ID(Thread::current()); |
75 _thread_trace_id = JFR_THREAD_ID(Thread::current()); |
76 } else { |
76 } else { |
77 assert(THREAD_TRACE_ID(Thread::current()) == _thread_trace_id, |
77 assert(JFR_THREAD_ID(Thread::current()) == _thread_trace_id, |
78 "The PromotionFailedInfo should be thread local."); |
78 "The PromotionFailedInfo should be thread local."); |
79 } |
79 } |
80 } |
80 } |
81 |
81 |
82 void reset() { |
82 void reset() { |