aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarti Raudsepp <marti@juffo.org>2009-10-26 20:33:05 -0400
committerIngo Molnar <mingo@elte.hu>2009-10-27 09:52:32 -0400
commit689d30187828afe1faedf050b2f7593515b90c76 (patch)
tree5432cc61da8e4c5bf50b80159a2d4bd1ed4c95e3
parent85df6f683efa457440eb922272fd5a71aa022ad4 (diff)
perf tools: Output 'perf list' to stdout not stderr
Writing to stdout is probably the expected behavior because the user explicitly asked for a list. Signed-off-by: Marti Raudsepp <marti@juffo.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Paul Mackerras <paulus@samba.org> LKML-Reference: <4ebb59420ef057972167.1256603585@localhost> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--tools/perf/util/parse-events.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/tools/perf/util/parse-events.c b/tools/perf/util/parse-events.c
index e9e6d5c0ae4a..31baa5a60365 100644
--- a/tools/perf/util/parse-events.c
+++ b/tools/perf/util/parse-events.c
@@ -806,7 +806,7 @@ static void print_tracepoint_events(void)
806 for_each_event(sys_dirent, evt_dir, evt_dirent, evt_next) { 806 for_each_event(sys_dirent, evt_dir, evt_dirent, evt_next) {
807 snprintf(evt_path, MAXPATHLEN, "%s:%s", 807 snprintf(evt_path, MAXPATHLEN, "%s:%s",
808 sys_dirent.d_name, evt_dirent.d_name); 808 sys_dirent.d_name, evt_dirent.d_name);
809 fprintf(stderr, " %-42s [%s]\n", evt_path, 809 printf(" %-42s [%s]\n", evt_path,
810 event_type_descriptors[PERF_TYPE_TRACEPOINT+1]); 810 event_type_descriptors[PERF_TYPE_TRACEPOINT+1]);
811 } 811 }
812 closedir(evt_dir); 812 closedir(evt_dir);
@@ -823,8 +823,8 @@ void print_events(void)
823 unsigned int i, type, op, prev_type = -1; 823 unsigned int i, type, op, prev_type = -1;
824 char name[40]; 824 char name[40];
825 825
826 fprintf(stderr, "\n"); 826 printf("\n");
827 fprintf(stderr, "List of pre-defined events (to be used in -e):\n"); 827 printf("List of pre-defined events (to be used in -e):\n");
828 828
829 for (i = 0; i < ARRAY_SIZE(event_symbols); i++, syms++) { 829 for (i = 0; i < ARRAY_SIZE(event_symbols); i++, syms++) {
830 type = syms->type + 1; 830 type = syms->type + 1;
@@ -832,19 +832,19 @@ void print_events(void)
832 type = 0; 832 type = 0;
833 833
834 if (type != prev_type) 834 if (type != prev_type)
835 fprintf(stderr, "\n"); 835 printf("\n");
836 836
837 if (strlen(syms->alias)) 837 if (strlen(syms->alias))
838 sprintf(name, "%s OR %s", syms->symbol, syms->alias); 838 sprintf(name, "%s OR %s", syms->symbol, syms->alias);
839 else 839 else
840 strcpy(name, syms->symbol); 840 strcpy(name, syms->symbol);
841 fprintf(stderr, " %-42s [%s]\n", name, 841 printf(" %-42s [%s]\n", name,
842 event_type_descriptors[type]); 842 event_type_descriptors[type]);
843 843
844 prev_type = type; 844 prev_type = type;
845 } 845 }
846 846
847 fprintf(stderr, "\n"); 847 printf("\n");
848 for (type = 0; type < PERF_COUNT_HW_CACHE_MAX; type++) { 848 for (type = 0; type < PERF_COUNT_HW_CACHE_MAX; type++) {
849 for (op = 0; op < PERF_COUNT_HW_CACHE_OP_MAX; op++) { 849 for (op = 0; op < PERF_COUNT_HW_CACHE_OP_MAX; op++) {
850 /* skip invalid cache type */ 850 /* skip invalid cache type */
@@ -852,17 +852,17 @@ void print_events(void)
852 continue; 852 continue;
853 853
854 for (i = 0; i < PERF_COUNT_HW_CACHE_RESULT_MAX; i++) { 854 for (i = 0; i < PERF_COUNT_HW_CACHE_RESULT_MAX; i++) {
855 fprintf(stderr, " %-42s [%s]\n", 855 printf(" %-42s [%s]\n",
856 event_cache_name(type, op, i), 856 event_cache_name(type, op, i),
857 event_type_descriptors[4]); 857 event_type_descriptors[4]);
858 } 858 }
859 } 859 }
860 } 860 }
861 861
862 fprintf(stderr, "\n"); 862 printf("\n");
863 fprintf(stderr, " %-42s [raw hardware event descriptor]\n", 863 printf(" %-42s [raw hardware event descriptor]\n",
864 "rNNN"); 864 "rNNN");
865 fprintf(stderr, "\n"); 865 printf("\n");
866 866
867 print_tracepoint_events(); 867 print_tracepoint_events();
868 868