On Wed, 11 Nov 2015, Sergey Senozhatsky wrote: > > This doesn't purport to explain why -O2 was added or why it's needed for← > > these tools. > > Hm, that was a sem-automatic action I saw no issues with (besides, I > considered this to be too small for a separate patch). `slabinfo' can > be used to collected extended '-X' measurements for gnuplot script > e.g. > `while [ 1 ]; do slabinfo -X >> stats; sleep 0.1s; done` > > so making it a bit lighter is sort of positive change, though I'm not > married to this option. > > > perf stats: > > -- OLD > > Performance counter stats for './slabinfo.old -X -B -N 100': > > 197.879348 task-clock (msec) # 0.969 CPUs utilized > > 22 context-switches # 0.111 K/sec > > 0 cpu-migrations # 0.000 K/sec > > 2,276 page-faults # 0.012 M/sec > > 182,916,015 cycles # 0.924 GHz > > <not supported> stalled-cycles-frontend > <not supported> stalled-cycles-backend > 259,843,733 instructions # 1.42 insns per cycle > > 53,949,755 branches # 272.640 M/sec > > 157,607 branch-misses # 0.29% of all branches > > > 0.204190648 seconds time elapsed > > > -- NEW (-O2) > > Performance counter stats for './slabinfo.new -X -B -N 100': > > 169.963546 task-clock (msec) # 0.977 CPUs utilized > > 9 context-switches # 0.053 K/sec > > 0 cpu-migrations # 0.000 K/sec > > 2,276 page-faults # 0.013 M/sec > > 153,582,826 cycles # 0.904 GHz > > <not supported> stalled-cycles-frontend > <not supported> stalled-cycles-backend > 218,505,232 instructions # 1.42 insns per cycle > > 45,410,422 branches # 267.177 M/sec > > 114,126 branch-misses # 0.25% of all branches > > > 0.173921887 seconds time elapsed > > > ./scripts/bloat-o-meter tools/vm/slabinfo.old tools/vm/slabinfo.new > add/remove: 5/23 grow/shrink: 7/7 up/down: 6434/-9495 (-3061) > function old new delta > main 878 3699 +2821 > output_slabs 307 2075 +1768 > report 781 1905 +1124 > rename_slabs 167 333 +166 > read_slab_obj.isra - 131 +131 > ops.isra - 104 +104 > set_obj.isra - 102 +102 > read_obj 145 236 +91 > sort_slabs 414 478 +64 > slab_empty.part - 32 +32 > get_obj.part - 17 +17 > slab_numa 542 556 +14 > decode_numa_list 235 230 -5 > fatal 176 160 -16 > usage 17 - -17 > onoff 27 - -27 > show_tracking 193 162 -31 > get_obj_and_str 157 124 -33 > slab_size 43 - -43 > slab_mismatch 47 - -47 > get_obj 48 - -48 > slab_waste 56 - -56 > link_slabs 226 169 -57 > slab_activity 60 - -60 > slab_validate 63 - -63 > slab_shrink 63 - -63 > slab_empty 74 - -74 > first_line 74 - -74 > store_size 271 191 -80 > xtotals 142 - -142 > ops 145 - -145 > set_obj 162 - -162 > read_slab_obj 182 - -182 > find_one_alias 187 - -187 > sort_aliases 288 - -288 > alias 298 - -298 > debug_opt_scan 355 - -355 > slab_debug 870 - -870 > totals 4136 3198 -938 > slabcache 1289 - -1289 > read_slab_dir 1798 - -1798 > slab_stats 2047 - -2047 > > > > I believe the remaining tools will not `suffer' as well. > Do you prefer to remove -O2? >
No, I have no objection to removing -O2. I'd prefer that the rationale be included in the commit description, however. Acked-by: David Rientjes <rient...@google.com>