From: Jaswinder Singh Rajput Date: Sat, 27 Jun 2009 18:19:09 +0000 (+0530) Subject: perf stat: Micro-optimize the code: memcpy is only required if no event is selected... X-Git-Tag: v2.6.31-rc2~30^2~8 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3043569dc8fbe9228b76174f15d1a7152c48a20;p=pandora-kernel.git perf stat: Micro-optimize the code: memcpy is only required if no event is selected and !null_run Set attrs and nr_counters if no event is selected and !null_run. Setting of attrs should depend on number of counters, so we need to memcpy only for sizeof(default_attrs) Also set nr_counters as ARRAY_SIZE(default_attrs) in place of hardcoded value. Signed-off-by: Jaswinder Singh Rajput Cc: Peter Zijlstra LKML-Reference: <1246126749.32198.16.camel@hpdv5.satnam> Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed