[PATCH] powertop: code shrink -- more and more robust process_timer_stats

Denys Vlasenko vda.linux at googlemail.com
Thu Nov 4 07:42:30 UTC 2010


On Wednesday 03 November 2010 23:21, Maksym Kryzhanovskyy wrote:
> Attached is a more robust patch for powertop. Sorry for the message flood.
> 
> ------------------------------------------------------------------------------
> (add/remove: 0/0 grow/shrink: 2/3 up/down: 10/-342)          Total: -332 bytes
>    text	   data	    bss	    dec	    hex	filename
>  743482	   2107	   9092	 754681	  b83f9	busybox_old
>  743150	   2107	   9092	 754349	  b82ad	busybox_unstripped
> 
> Max


I don't like "total_events" optimization. strstr is somewhat
more expensive function than strcmp, whereas added #ifdefs
make code harder to read. I guess it saves 15 bytes or so?

I believe you meant index_in_strings, not index_in_substrings?

Applied with these small changes, thanks!

-- 
vda


More information about the busybox mailing list