perf: Robustify proc and debugfs file recording
authorSonny Rao <sonnyrao@chromium.org>
Thu, 14 Jul 2011 03:34:43 +0000 (13:34 +1000)
committerSteven Rostedt <rostedt@goodmis.org>
Thu, 14 Jul 2011 19:53:01 +0000 (15:53 -0400)
While attempting to create a timechart of boot up I found perf didn't
tolerate modules being loaded/unloaded.  This patch fixes this by
reading the file once and then writing the size read at the correct
point in the file.  It also simplifies the code somewhat.

Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Link: http://lkml.kernel.org/r/10011.1310614483@neuling.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>

No differences found