~linaro-toolchain-dev/cortex-strings/trunk

« back to all changes in this revision

Viewing changes to scripts/plot-top.py

  • Committer: Will Newton
  • Date: 2013-11-29 18:10:00 UTC
  • Revision ID: will.newton@linaro.org-20131129181000-i4qers0vxwao2a5g
Add glibc strchr reference implementation.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
        heights = []
28
28
 
29
29
        for function in functions:
30
 
            matches = [x for x in records if x.variant==variant and x.function==function and x.alignment==8]
 
30
            matches = [x for x in records if x.variant==variant and x.function==function and x.src_alignment==8]
31
31
 
32
32
            if matches:
33
 
                match = matches[0]
34
 
                heights.append(match.bytes*match.loops/match.elapsed/(1024*1024))
 
33
                vals = [match.bytes*match.loops/match.elapsed/(1024*1024) for
 
34
                        match in matches]
 
35
                mean = sum(vals)/len(vals)
 
36
                heights.append(mean)
35
37
            else:
36
38
                heights.append(0)
37
39