Looks like the java variant is pegged toward specific lines in the code; I looked through it at one poin. I think something in clojure would be along the function instrumentation route; sort of like the debugger in Cider goes through and adds breakpoints to source. It would be seemingly trivial to add the artificial deceleration points to clojure expressions in some fashion. Then the sampling process becomes picking different expressions to slow down so the profiler can gather its samples.
The jcoz workflow is a bit tricky on first read. Interesting concept though.
Yes, I was thinking along those same lines, instrumenting functions as a debugger (or other profilers, like Tufte) would do. There was a discussion about this on Clojureverse last year, but I think nothing came out of it... The idea itself seems great, in that it's simple, and effective.
No, but since I saw that strange loop talk about causal profiling, I've been wondering how hard this would be to implement natively in Clojure...
Looks like the java variant is pegged toward specific lines in the code; I looked through it at one poin. I think something in clojure would be along the function instrumentation route; sort of like the debugger in Cider goes through and adds breakpoints to source. It would be seemingly trivial to add the artificial deceleration points to clojure expressions in some fashion. Then the sampling process becomes picking different expressions to slow down so the profiler can gather its samples.
The jcoz workflow is a bit tricky on first read. Interesting concept though.
Yes, I was thinking along those same lines, instrumenting functions as a debugger (or other profilers, like Tufte) would do. There was a discussion about this on Clojureverse last year, but I think nothing came out of it... The idea itself seems great, in that it's simple, and effective.
That would probably be funding-worthy and broadly useful. Hmm.
This is the thread from clojureverse https://clojureverse.org/t/avoiding-recursive-function-replacement-with-redefs-fn/5399