Comments (4)
Any update on this?
from luatrace.
Sorry, last time I looked at this I was pushed for time and couldn't work anything out because the stack traces in the two are exactly the same. Turns out that the problem is that both traces trace off the top of the trace stack (I'm not quite sure how this happens because when the trace starts there's an attempt to build the full current stack), but a the failing trace records a line with non-zero time when were "above" the top of the stack. The quick and dirty solution is to just ignore time that occurs in a stack frame we don't know about.
I'll have a look at the initial stack build and see if there's anything obvious, but I'm not hopeful.
from luatrace.
Nope, that wasn't it at all.
trace-out-failing.txt includes a line that records time on a line that isn't in the current function's set of lines. I don't know why that might be.
When this happens, profile guesses that it's LuaJIT forgetting to tell us about a return (this used to happen, I don't know if it still does) and adds an extra return before continuing.
In this case, it's the wrong thing to do. The extra return means that we jump off the top of the stack when we should be returning to test_json.lua.
So now, when we find time attributed to a line that's not in the current function, we look and see if the line is in the caller of the current function. If it is, then we guess the missing return as before. If it's not, we give up, complain, but don't add the extra return.
Which, in this case, prevents the stack getting out-of-whack by one frame.
from luatrace.
Well, with your latest changes I can't reproduce the issue, so it seems to be fixed :)
Thanks a lot!
from luatrace.
Related Issues (11)
- make fails on Ubuntu HOT 10
- What should I do when I got this numbers? HOT 1
- Make fail about dirname and -I mssing path
- luatrace is not compatible with strict because unintended global variable
- Please provide a LuaRocks rock for the tool HOT 8
- build on msvc HOT 1
- Error compiling git head (db7fb4ef3ad7a544aeab4b2786a905af47fdd409) HOT 4
- Errors when tracing LuLPeg HOT 5
- How to use for embedded luajit2 HOT 2
- luatrace.profile crashes trying to index a local 'thread' HOT 8
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 luatrace.