equal
deleted
inserted
replaced
58 #include "prims/jvmtiExport.hpp" |
58 #include "prims/jvmtiExport.hpp" |
59 #include "prims/jvmtiThreadState.hpp" |
59 #include "prims/jvmtiThreadState.hpp" |
60 #include "runtime/arguments.hpp" |
60 #include "runtime/arguments.hpp" |
61 #include "runtime/handles.inline.hpp" |
61 #include "runtime/handles.inline.hpp" |
62 #include "runtime/javaCalls.hpp" |
62 #include "runtime/javaCalls.hpp" |
|
63 #include "runtime/os.hpp" |
63 #include "runtime/perfData.hpp" |
64 #include "runtime/perfData.hpp" |
64 #include "runtime/reflection.hpp" |
65 #include "runtime/reflection.hpp" |
65 #include "runtime/safepointVerifiers.hpp" |
66 #include "runtime/safepointVerifiers.hpp" |
66 #include "runtime/signature.hpp" |
67 #include "runtime/signature.hpp" |
67 #include "runtime/timer.hpp" |
68 #include "runtime/timer.hpp" |
5745 if (host_pkg_name != NULL) { |
5746 if (host_pkg_name != NULL) { |
5746 int host_pkg_len = (int)strlen(host_pkg_name); |
5747 int host_pkg_len = (int)strlen(host_pkg_name); |
5747 int class_name_len = _class_name->utf8_length(); |
5748 int class_name_len = _class_name->utf8_length(); |
5748 int symbol_len = host_pkg_len + 1 + class_name_len; |
5749 int symbol_len = host_pkg_len + 1 + class_name_len; |
5749 char* new_anon_name = NEW_RESOURCE_ARRAY(char, symbol_len + 1); |
5750 char* new_anon_name = NEW_RESOURCE_ARRAY(char, symbol_len + 1); |
5750 int n = snprintf(new_anon_name, symbol_len + 1, "%s/%.*s", |
5751 int n = os::snprintf(new_anon_name, symbol_len + 1, "%s/%.*s", |
5751 host_pkg_name, class_name_len, _class_name->base()); |
5752 host_pkg_name, class_name_len, _class_name->base()); |
5752 assert(n == symbol_len, "Unexpected number of characters in string"); |
5753 assert(n == symbol_len, "Unexpected number of characters in string"); |
5753 |
5754 |
5754 // Decrement old _class_name to avoid leaking. |
5755 // Decrement old _class_name to avoid leaking. |
5755 _class_name->decrement_refcount(); |
5756 _class_name->decrement_refcount(); |
5756 |
5757 |