github.com/luchsh/agentlib.go@v0.0.0-20221115155834-ffd0caec4d72/README.md (about) 1 > Dear Java, of course I still love you! 2 3 This project tries to explore the possibility of writing a JVMTI agent in the Go language. 4 5 The idea attracts me primarily for two reasons: 6 - Smaller memory footprint and usually simpler comparing to a Java agent. 7 - Easy to develop complex logic in one agent (such as running a HTTP server inside this agent). 8 9 It is interesting to accommodate more than one GC-based languages in the same process. 10 These language runtimes have their own background threads, different synchronization mechanims, 11 and even keep communicating with each other. 12 13 Build and run 14 --- 15 Just run following command from project root directory 16 ``` 17 bash -x build.sh 18 ``` 19 > For now, only Linux and Mac OSX are supported. 20 21 To run it 22 ``` 23 ./test.exe& 24 ``` 25 26 Then 27 - Access 'http://127.0.0.1:8081/debug/java/' to view pages for the Java runtime; 28 - Meanwhile access 'http://127.0.0.1:80801/debug/pprof/' to view pprof from the Go runtime. 29 30 Test 31 --- 32 Please try following command to test 33 ``` 34 go test -v ./... 35 ``` 36 37 38 39 Known issues 40 --- 41 Current codebase is just a skeleton which seems to be capable of running some demos. 42 Need more time to complete the jvmti and jni wrappers.