-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile (with a Cassette Pass) until fire breakpoint is hit #306
Comments
I don't really think this is the right way to go. It wouldn't handle cases like
People would need to start splitting up their functions into "work functions" and the part they want to debug etc. Also, having to run Cassette on everything has a lot of drawbacks so I don't think this is the solution. |
I think this is a solution worth investigating, I started to write code for it, but I am still getting familar with how JuliaInterpretter works. |
The Cassette-less alternative to this (at least for file breakpoints) would be some kind of Infiltrator/Debugger hybrid. Setting a breakpoint in whatever UI would recompile the relevant method with an So basically if you have
and set a breakpoint on line 3 you'd end up with
or something close to that. You also wouldn't need to prefix your function invocation with |
Yeah, I initially thought that was what Inflitrator did, and was going to just insert infliltrator's code. I think just making an infiltrator style version of this would be pretty solid. |
Benchmarkingwith code written to always call continue when breakpoint hit. Using code from New benchmarking function
Trial is with Native: (no breakpoints)winter(x)
No breakpointsrun_interpretted(winter, x)
run_mixedmode(winter, x)
Runtime for mixedmode is the clear winner here, since it runs at native speed, The mixed mode compile-time was 300x worse than native, Breakpoint on
|
The is a case where the breakppoint on Exp is a problem: |
Getting a bit ahead of self here, but this kind of mixed mode would also solve that in Juno. |
@timholy @KristofferC whats next for this idea? |
I'm a bit swamped now, maybe talk at JuliaCon? Or in a month and a half, I may be able to carve out some time around the mid-March timeframe. |
I'm happy to hold til JuliaCon. |
The idea that @MikeInnes and I came up with last night:
User actions:
@compiled_run foo()
Now to do this we need a Cassette style pass,
that replaces every function call (in the compiled section) with:
Pseudocode:
Further more, when
Continue
is run we can switch back into that compile.(Possibly "ContinueCompiled").
The cost of this, you can't
StepOut
into compiled code.Unless you made the compiled section actually have the full instrumention of MagneticReadHead.
But the advantage of this simpler compiler pass code over MagneticReadHead
is that it doesn't add anywhere need as many statements to the Code IR.
So while everything still needs to recompile, it doesn't hit those compile-time blackholes that MRH has.
The text was updated successfully, but these errors were encountered: