| 75 | JMethodCache FrameName::_cache; |
| 76 | |
| 77 | FrameName::FrameName(Arguments& args, int style, int epoch, Mutex& thread_names_lock, ThreadMap& thread_names) : |
| 78 | _class_names(), |
| 79 | _include(), |
| 80 | _exclude(), |
| 81 | _str(), |
| 82 | _style(style), |
| 83 | _cache_epoch((unsigned char)epoch), |
| 84 | _cache_max_age(args._mcache), |
| 85 | _thread_names_lock(thread_names_lock), |
| 86 | _thread_names(thread_names), |
| 87 | _jni(VM::jni()) |
| 88 | { |
| 89 | // Require printf to use standard C format regardless of system locale |
| 90 | _saved_locale = uselocale(newlocale(LC_NUMERIC_MASK, "C", (locale_t)0)); |
| 91 | |
| 92 | for (const char* s : args._include) _include.push_back(s); |
| 93 | for (const char* s : args._exclude) _exclude.push_back(s); |
| 94 | |
| 95 | Profiler::instance()->classMap()->collect(_class_names); |
| 96 | } |
| 97 | |
| 98 | FrameName::~FrameName() { |
| 99 | if (_cache_max_age == 0) { |