pypy-stm - how do I know when transactions are turning inevitable?

Hello! As far as I understand, pypy-stm reports only conflicts, but not transactions that turn inevitable. But if transaction turns inevitable, it means that other transactions can not proceed. So it is hard to debug loss of parallelization when some transactions turn inevitable but other transactions do not conflict - the program is just silently slow. Is this correct? Are there any plans on giving some hooks for this case, or stacktraces similar to aborting transactions? Or maybe there is some other method?

Hi, On Sun, Sep 15, 2013 at 7:15 AM, Костя Лопухин <kostia.lopuhin@gmail.com> wrote:
Yes, that's correct. In fact even the aborts are not reported any more on a "pypy-stm-jit" because recording the location is more difficult with the JIT than without. ("pypy-stm-jit" also causes extra aborts and inevitable transactions right now; it should not.) I realized recently that seeing inevitable transactions would be as useful as seeing aborts. So right now, if you translate the "stmgc-c4" branch at 131f1071ef10 (with or without the jit), then you get one-line reports to stderr for both aborts and inevitable transactions. It's already better than nothing but it contains only very minimal information. (The "[N]" prefix is the thread number.) We definitely need to figure out how to record more details. Once this is done, the second issue is how to report it to the user. For example we need to report for how much time a transaction ran as inevitable, a traceback pointing to the Python line, and so on. We also need (likely) a way to store this data into a file, and query the file for the most costly entries in term of time. Obviously, implementation-wise, this depends on the previous part; but as this part is more accessible, I'd expect to get more feedback and contributions :-) A bientôt, Armin.

Hi, On Sun, Sep 15, 2013 at 7:15 AM, Костя Лопухин <kostia.lopuhin@gmail.com> wrote:
Yes, that's correct. In fact even the aborts are not reported any more on a "pypy-stm-jit" because recording the location is more difficult with the JIT than without. ("pypy-stm-jit" also causes extra aborts and inevitable transactions right now; it should not.) I realized recently that seeing inevitable transactions would be as useful as seeing aborts. So right now, if you translate the "stmgc-c4" branch at 131f1071ef10 (with or without the jit), then you get one-line reports to stderr for both aborts and inevitable transactions. It's already better than nothing but it contains only very minimal information. (The "[N]" prefix is the thread number.) We definitely need to figure out how to record more details. Once this is done, the second issue is how to report it to the user. For example we need to report for how much time a transaction ran as inevitable, a traceback pointing to the Python line, and so on. We also need (likely) a way to store this data into a file, and query the file for the most costly entries in term of time. Obviously, implementation-wise, this depends on the previous part; but as this part is more accessible, I'd expect to get more feedback and contributions :-) A bientôt, Armin.
participants (2)
-
Armin Rigo
-
Костя Лопухин