diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-10 14:48:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-08-10 14:48:51 -0400 |
commit | d00aa6695b67a31be2ce5f7464da32c20cb50699 (patch) | |
tree | 4e4a2bbd1ab710ddca3bd1a611a6c3e9a00f52f9 /tools/perf/builtin-record.c | |
parent | cec36911b5fa4ac342f6de856b12a9f71f84e6e5 (diff) | |
parent | 1853db0e02ae4088f102b0d8e59e83dc98f93f03 (diff) |
Merge branch 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'perfcounters-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: (27 commits)
perf_counter: Zero dead bytes from ftrace raw samples size alignment
perf_counter: Subtract the buffer size field from the event record size
perf_counter: Require CAP_SYS_ADMIN for raw tracepoint data
perf_counter: Correct PERF_SAMPLE_RAW output
perf tools: callchain: Fix bad rounding of minimum rate
perf_counter tools: Fix libbfd detection for systems with libz dependency
perf: "Longum est iter per praecepta, breve et efficax per exempla"
perf_counter: Fix a race on perf_counter_ctx
perf_counter: Fix tracepoint sampling to be part of generic sampling
perf_counter: Work around gcc warning by initializing tracepoint record unconditionally
perf tools: callchain: Fix sum of percentages to be 100% by displaying amount of ignored chains in fractal mode
perf tools: callchain: Fix 'perf report' display to be callchain by default
perf tools: callchain: Fix spurious 'perf report' warnings: ignore empty callchains
perf record: Fix the -A UI for empty or non-existent perf.data
perf util: Fix do_read() to fail on EOF instead of busy-looping
perf list: Fix the output to not include tracepoints without an id
perf_counter/powerpc: Fix oops on cpus without perf_counter hardware support
perf stat: Fix tool option consistency: rename -S/--scale to -c/--scale
perf report: Add debug help for the finding of symbol bugs - show the symtab origin (DSO, build-id, kernel, etc)
perf report: Fix per task mult-counter stat reporting
...
Diffstat (limited to 'tools/perf/builtin-record.c')
-rw-r--r-- | tools/perf/builtin-record.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c index 90c98082af1..0345aad8eba 100644 --- a/tools/perf/builtin-record.c +++ b/tools/perf/builtin-record.c | |||
@@ -525,10 +525,14 @@ static int __cmd_record(int argc, const char **argv) | |||
525 | signal(SIGCHLD, sig_handler); | 525 | signal(SIGCHLD, sig_handler); |
526 | signal(SIGINT, sig_handler); | 526 | signal(SIGINT, sig_handler); |
527 | 527 | ||
528 | if (!stat(output_name, &st) && !force && !append_file) { | 528 | if (!stat(output_name, &st) && st.st_size) { |
529 | fprintf(stderr, "Error, output file %s exists, use -A to append or -f to overwrite.\n", | 529 | if (!force && !append_file) { |
530 | output_name); | 530 | fprintf(stderr, "Error, output file %s exists, use -A to append or -f to overwrite.\n", |
531 | exit(-1); | 531 | output_name); |
532 | exit(-1); | ||
533 | } | ||
534 | } else { | ||
535 | append_file = 0; | ||
532 | } | 536 | } |
533 | 537 | ||
534 | flags = O_CREAT|O_RDWR; | 538 | flags = O_CREAT|O_RDWR; |