aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/session.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/session.c')
-rw-r--r--tools/perf/util/session.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/tools/perf/util/session.c b/tools/perf/util/session.c
index 313dac2d94ce..105f00bfd555 100644
--- a/tools/perf/util/session.c
+++ b/tools/perf/util/session.c
@@ -652,10 +652,11 @@ static void callchain__printf(struct sample_data *sample)
652{ 652{
653 unsigned int i; 653 unsigned int i;
654 654
655 printf("... chain: nr:%Lu\n", sample->callchain->nr); 655 printf("... chain: nr:%" PRIu64 "\n", sample->callchain->nr);
656 656
657 for (i = 0; i < sample->callchain->nr; i++) 657 for (i = 0; i < sample->callchain->nr; i++)
658 printf("..... %2d: %016Lx\n", i, sample->callchain->ips[i]); 658 printf("..... %2d: %016" PRIx64 "\n",
659 i, sample->callchain->ips[i]);
659} 660}
660 661
661static void perf_session__print_tstamp(struct perf_session *session, 662static void perf_session__print_tstamp(struct perf_session *session,
@@ -672,7 +673,7 @@ static void perf_session__print_tstamp(struct perf_session *session,
672 printf("%u ", sample->cpu); 673 printf("%u ", sample->cpu);
673 674
674 if (session->sample_type & PERF_SAMPLE_TIME) 675 if (session->sample_type & PERF_SAMPLE_TIME)
675 printf("%Lu ", sample->time); 676 printf("%" PRIu64 " ", sample->time);
676} 677}
677 678
678static void dump_event(struct perf_session *session, event_t *event, 679static void dump_event(struct perf_session *session, event_t *event,
@@ -681,16 +682,16 @@ static void dump_event(struct perf_session *session, event_t *event,
681 if (!dump_trace) 682 if (!dump_trace)
682 return; 683 return;
683 684
684 printf("\n%#Lx [%#x]: event: %d\n", file_offset, event->header.size, 685 printf("\n%#" PRIx64 " [%#x]: event: %d\n",
685 event->header.type); 686 file_offset, event->header.size, event->header.type);
686 687
687 trace_event(event); 688 trace_event(event);
688 689
689 if (sample) 690 if (sample)
690 perf_session__print_tstamp(session, event, sample); 691 perf_session__print_tstamp(session, event, sample);
691 692
692 printf("%#Lx [%#x]: PERF_RECORD_%s", file_offset, event->header.size, 693 printf("%#" PRIx64 " [%#x]: PERF_RECORD_%s", file_offset,
693 event__get_event_name(event->header.type)); 694 event->header.size, event__get_event_name(event->header.type));
694} 695}
695 696
696static void dump_sample(struct perf_session *session, event_t *event, 697static void dump_sample(struct perf_session *session, event_t *event,
@@ -699,8 +700,9 @@ static void dump_sample(struct perf_session *session, event_t *event,
699 if (!dump_trace) 700 if (!dump_trace)
700 return; 701 return;
701 702
702 printf("(IP, %d): %d/%d: %#Lx period: %Ld\n", event->header.misc, 703 printf("(IP, %d): %d/%d: %#" PRIx64 " period: %" PRIu64 "\n",
703 sample->pid, sample->tid, sample->ip, sample->period); 704 event->header.misc, sample->pid, sample->tid, sample->ip,
705 sample->period);
704 706
705 if (session->sample_type & PERF_SAMPLE_CALLCHAIN) 707 if (session->sample_type & PERF_SAMPLE_CALLCHAIN)
706 callchain__printf(sample); 708 callchain__printf(sample);
@@ -843,8 +845,8 @@ static void perf_session__warn_about_errors(const struct perf_session *session,
843{ 845{
844 if (ops->lost == event__process_lost && 846 if (ops->lost == event__process_lost &&
845 session->hists.stats.total_lost != 0) { 847 session->hists.stats.total_lost != 0) {
846 ui__warning("Processed %Lu events and LOST %Lu!\n\n" 848 ui__warning("Processed %" PRIu64 " events and LOST %" PRIu64
847 "Check IO/CPU overload!\n\n", 849 "!\n\nCheck IO/CPU overload!\n\n",
848 session->hists.stats.total_period, 850 session->hists.stats.total_period,
849 session->hists.stats.total_lost); 851 session->hists.stats.total_lost);
850 } 852 }
@@ -918,7 +920,7 @@ more:
918 920
919 if (size == 0 || 921 if (size == 0 ||
920 (skip = perf_session__process_event(self, &event, ops, head)) < 0) { 922 (skip = perf_session__process_event(self, &event, ops, head)) < 0) {
921 dump_printf("%#Lx [%#x]: skipping unknown header type: %d\n", 923 dump_printf("%#" PRIx64 " [%#x]: skipping unknown header type: %d\n",
922 head, event.header.size, event.header.type); 924 head, event.header.size, event.header.type);
923 /* 925 /*
924 * assume we lost track of the stream, check alignment, and 926 * assume we lost track of the stream, check alignment, and
@@ -1023,7 +1025,7 @@ more:
1023 1025
1024 if (size == 0 || 1026 if (size == 0 ||
1025 perf_session__process_event(session, event, ops, file_pos) < 0) { 1027 perf_session__process_event(session, event, ops, file_pos) < 0) {
1026 dump_printf("%#Lx [%#x]: skipping unknown header type: %d\n", 1028 dump_printf("%#" PRIx64 " [%#x]: skipping unknown header type: %d\n",
1027 file_offset + head, event->header.size, 1029 file_offset + head, event->header.size,
1028 event->header.type); 1030 event->header.type);
1029 /* 1031 /*