Summary: | Provide option for llvmpipe JIT code to run cleanly under valgrind | ||
---|---|---|---|
Product: | Mesa | Reporter: | John Firebaugh <john.firebaugh> |
Component: | Drivers/Gallium/llvmpipe | Assignee: | mesa-dev |
Status: | RESOLVED MOVED | QA Contact: | mesa-dev |
Severity: | normal | ||
Priority: | medium | ||
Version: | 13.0 | ||
Hardware: | x86-64 (AMD64) | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
John Firebaugh
2017-01-25 01:37:31 UTC
I agree it would be really nice if we wouldn't get valgrind errors. If you figure out how to fix it, patches welcome... I tried to look into it at some point but couldn't really figure it out (didn't invest all that much time though). I'm not even sure this isn't a valgrind bug (last I checked there could still be some problems with simd instructions). Tracking this stuff down in jit code isn't exactly easy, and having these harmless errors makes it more difficult to debug real issues (I've seen invalid reads and writes which needed to be fixed, and they got kinda buried in the valgrind output). I agree with Roland. I wouldn't oppose patches fixing these (including --enable-valgrind build option if performance suffered). But it won't be trivial. A big source of issues is the fact that we need padding to fill the SIMD instructions lanes. That is, we might need to process 3 floats, but then we allocate tempoary variables worth of 8 floats, where the last 5 are unitizialied garbagge. It's not hard to fix this, but there are hundreds of places this happens. I suspect that in many cases are actually false positives, ie, limitatio in valgrind analysis: we use uninitialize memory for temporary calculations, but they are soon discarded. How about `--suppressions` option? For llvmpipe there doesn't seem to be many different stack traces. Another option is to use call VALGRIND_DISABLE_ERROR_REPORTING / VALGRIND_ENABLE_ERROR_REPORTING before/after JIT code. Feel free to experiment with any of the above FWIW. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/242. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.