Comments (2)
Currently TracePoint doesn't provide such API or configuration and the official debugger ruby/debug
also implements filtering at TracePoint level. So I don't see an obvious way to get around it.
Otherwise, you're throwing away 99% of the method calls that aren't application-level, and it makes for incredibly slow tracing.
You need to throw those calls away even in C-extension/VM level too, no? So the only difference is at which level we do the path comparison and early return.
While implementing the filtering logic in C-extension, or at VM level through new APIs might increase the performance, they both come with maintenance cost on the gem or even CRuby itself.
Therefore, as the only maintainer of the gem, I'd like to work on these fronts first before investing in this optimisation:
- How can we make this tool and the concept of tracing more widely adopted?
- What other features could be beneficial to our users under the current performance profile?
- Can we use this gem's usages to convince and work with CRuby maintainers to provide more generalised optimisation on TracePoint?
So to summarise, I understand your concern about performance and I appreciate that you're raising the issue. But given the limited adoption on this gem and the resource I have, I'm not able to prioritise this now.
from tracer.
Optimally, the TracePoint class would only instrument those methods upfront that met the path filtering criteria.
This is similar to the approach that I did with Call Stacking - overriding upfront only the application-level methods in a module and then pretending the module to the class. To deinstrument the methods, they are simply removed from the prepended module.
It'd be nice if the selective method instrumentation were done at the VM level so that I could use the TracePoint implementation. I don't know enough about the C internals, yet.
How can we make this tool and the concept of tracing more widely adopted?
I'm working towards better awareness of trace style debugging with my app Call Stacking ( https://callstacking.com/ ).
from tracer.
Related Issues (4)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tracer.