[llvm-bugs] [Bug 31949] opt-viewer should have a way to deterministically debug

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Feb 14 10:30:58 PST 2017


http://bugs.llvm.org/show_bug.cgi?id=31949

Adam Nemet <anemet at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #1 from Adam Nemet <anemet at apple.com> ---
Committed a fix in r295080:

[opt-viewer] For single-process, fall back on map instead of Pool.map

This allows for nicer backtrace and debugging when -j1 is passed:

  $ opt-viewer.py CMakeFiles/LLVMScalarOpts.dir/LoopVersioningLICM.cpp.opt.yaml
html
  Traceback (most recent call last):
    File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 405, in <module>
      generate_report(pmap, all_remarks, file_remarks, args.source_dir,
args.output_dir)
    File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 362, in
generate_report
      pmap(_render_file_bound, file_remarks.items())
    File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py",
line 251, in map
      return self.map_async(func, iterable, chunksize).get()
    File
"/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/multiprocessing/pool.py",
line 567, in get
      raise self._value
  Exception: blah

  $ opt-viewer.py -j 1
CMakeFiles/LLVMScalarOpts.dir/LoopVersioningLICM.cpp.opt.yaml html
  Traceback (most recent call last):
    File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 405, in <module>
      generate_report(pmap, all_remarks, file_remarks, args.source_dir,
args.output_dir)
    File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 362, in
generate_report
      pmap(_render_file_bound, file_remarks.items())
    File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 317, in _render_file
      SourceFileRenderer(source_dir, output_dir, filename).render(remarks)
    File "/org/llvm/utils/opt-viewer/opt-viewer.py", line 168, in __init__
      raise Exception("blah")
  Exception: blah

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170214/17a99579/attachment.html>


More information about the llvm-bugs mailing list