-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
More instrumentation (memory allocation, also fixes #7259) #7464
Conversation
Changes Unknown when pulling 15c9ef3 on teh/malloclog into * on master*. |
Wait |
Changes Unknown when pulling 09adfd5 on teh/malloclog into * on master*. |
This is cool but could you turn off the coveralls reporting on every pull request? It seems like it is going to generate a lot of noise. |
In this PR it does 😄. But there are still issues I'm working out.
I think coverage-testing is going to have to be a separate event. I'm pretty sure you're going to have to test with a single core (at least, until someone implements a way to transport coverage data from one process to another), and I kinda suspect we may even need to disable inlining. If so, it's going to be so freaking slow that we don't want to subject every PR to it. So, my modifications to |
I'm finding myself in a nasty situation where all tests pass on my laptop, they pass on a second machine in my lab (with a different distro and architecture), but I get this segfault when running on Travis. Frustratingly, this is the second time this has happened to me. I'm taking the mildly-heroic step of running the entire test suite using a single core under valgrind. That run will probably take something like 24 hours; in the meantime, does anyone have any ideas? This one is not some kind of file permission error, is it? |
In my experience, a polite mail to support@travis will get you ssh credentials to an identical travis vm for 24h, this could help you debugging if the segfault is decently reproducible. Nice piece of work btw. |
Ooh, that's a great tip, many thanks. Since I'm about to head out of town for the 4th and will have only spotty internet access, I'll wait to use those precious 24hrs until I get back. |
Got a Makefile/installation problem. Looking for advice from folks like @staticfloat, @tkelman, @ViralBShah, or anyone else who knows more about these matters than me, esp. across platforms. Bottom line: for
Any advice about which to choose? Or alternative suggestions? Presumably this should be implemented in the Makefile? (Note: the location of |
It looks like the makefiles are setting up a set of symlinks (or NTFS junctions for anyone who builds from source on Windows) well before |
Given that we do have code in our runtime to locate where the .jl files in base are, we probably can use the same directory lookup logic to find the location of base. |
Hmm, Coveralls prefers to display master, for which we got what was probably a partial result earlier. The actual number seems to be 91%. |
Working, cleaned up, and ready to merge when the time is right. |
That's amazingly high. Like unbelievably high – even given that this is the percentage of coverage of functions that we actually call while testing. I think that a good way to break this down might be to combine this number with the percentage of functions that we actually test. |
This seems pretty low risk and like it should be merged as soon as is reasonable. |
Anything that touches the compiler seems like it shouldn't be "low risk," but here I know what you mean.
Indeed. I think the main value is for a human looking over the results manually; one can quickly find a bunch of functions that should probably get tests. I think soon we should implement turning off inlining, but I'm inclined to merge as-is so we can get at least one night's run by PackageEval before fiddling with this more. Besides, I think the most exciting part of this is the part on memory allocation, and that's not really influenced by all the difficult issues surrounding code-coverage. |
More instrumentation (memory allocation, also fixes #7259)
So @timholy we/I should probably add support to this for Coverage.jl, I'm thinking maybe in a way that sorts lines by memory allocation? |
@IainNZ, I'll submit a PR. One thing that never happened was bikeshedding on the name of the output files. Are people happy with the |
I like |
Changed to |
This adds the ability to track the amount of memory allocated by each line of code. It mimics the
--code-coverage
functionality, writing afilename.jl.mlc
(mlc =malloc
, perhaps there's a better extension?) listing the number of bytes allocated by each line.It's already quite useful, but not perfect, and I confess to not really understanding what's wrong. Here's a test script:
which you use like this
Here's the resulting
.mlc
file: (EDIT: the off-by-one bug has been fixed)The core algorithm is to look for a change in
jl_gc_total_bytes
since the last line.Observations:
tests/
) shows allocation on the first line of the function.