GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — async-profiler/src/instrument.h at jonoffcpu-dev · jonoffcpu/async-profiler Expand file tree/ Copy pathinstrument.hMore file actions 69 lines (53 loc) · 1.78 KB / Copy pathinstrument.hFile metadata and controls69 lines (53 loc) · 1.78 KB 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 /* * Copyright The async-profiler authors * SPDX-License-Identifier: Apache-2.0 */ #ifndef _INSTRUMENT_H #define _INSTRUMENT_H #include <jvmti.h> #include <map> #include <string> #include "arch.h" #include "engine.h" typedef std::string ClassName; typedef std::string Method; // name and signature typedef long Latency; typedef std::map<Method, Latency> MethodTargets; typedef std::map<ClassName, MethodTargets> Targets; class Instrument : public Engine { private: static Targets _targets; static bool _instrument_class_loaded; static Latency _interval; static volatile u64 _calls; static volatile bool _running; static Error initialize(); static bool shouldRecordSample() { return _interval <= 1 || ((atomicInc(_calls) + 1) % _interval) == 0; } public: const char* type() { return "instrument"; } const char* title() { return "Java method profile"; } const char* units() { return "calls"; } long interval() { return _interval; } Error start(Arguments& args); void stop(); Error setupTargetClassAndMethod(const Arguments& args); void retransformMatchedClasses(jvmtiEnv* jvmti); static void JNICALL ClassFileLoadHook(jvmtiEnv* jvmti, JNIEnv* jni, jclass class_being_redefined, jobject loader, const char* name, jobject protection_domain, jint class_data_len, const u8* class_data, jint* new_class_data_len, u8** new_class_data); static void JNICALL recordEntry(JNIEnv* jni, jobject unused); static void JNICALL recordExit0(JNIEnv* jni, jobject unused, jlong startTimeNs); }; #endif // _INSTRUMENT_H |
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |