equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1999, 2015, 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. |
77 Thread* thread; |
77 Thread* thread; |
78 |
78 |
79 if (Threads::number_of_threads() == 0) { |
79 if (Threads::number_of_threads() == 0) { |
80 return JvmtiUtil::single_threaded_resource_area(); |
80 return JvmtiUtil::single_threaded_resource_area(); |
81 } |
81 } |
82 thread = ThreadLocalStorage::thread(); |
82 thread = Thread::current_or_null(); |
83 if (thread == NULL) { |
83 if (thread == NULL) { |
84 return JvmtiUtil::single_threaded_resource_area(); |
84 return JvmtiUtil::single_threaded_resource_area(); |
85 } |
85 } |
86 return thread->resource_area(); |
86 return thread->resource_area(); |
87 } |
87 } |