[Openmp-commits] [PATCH] D143702: [NFC] Convert openmp/runtime/tools/summarizeStats.py to python 3 syntax
    serge via Phabricator via Openmp-commits 
    openmp-commits at lists.llvm.org
       
    Fri Feb 17 14:29:44 PST 2023
    
    
  
serge-sans-paille added a comment.
@thieta ACK once you fix the issue spotted by at jlpeyton.
================
Comment at: openmp/runtime/tools/summarizeStats.py:306
                 numThreads = tmp[s]['SampleCount']['Total_OMP_parallel']
-                for key in data.keys():
+                for key in list(data.keys()):
                     if key[0:5] == 'Total':
----------------
jlpeyton wrote:
> serge-sans-paille wrote:
> > not needed
> I do think this list() is necessary because the `del data[key]` line may change the size of the dictionary during iteration.
Correct! my bad, thanks @jlpeyton for spotting this.
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D143702/new/
https://reviews.llvm.org/D143702
    
    
More information about the Openmp-commits
mailing list