]>
git.saurik.com Git - apple/system_cmds.git/blob - kdprof/SummaryPrinting.cpp
5 // Created by James McIlree on 4/19/13.
6 // Copyright (c) 2013 Apple. All rights reserved.
11 constexpr const char * const SummaryLineData :: indent_string
[];
13 void print_summary_header ( const Globals
& globals
) {
15 // Avg Actual Wanted Actual Wanted Jetsam
16 // All CPU Thr Avg Actual Wanted Concurrency Processes To Run Threads To Run VMFault VMFault IO Wait # IO IO Bytes Jetsam Proc
17 // [Time(mS)] Name Run% Idle% Intr% Idle% #Intr #CSW On CPU/µS CPU/mS CPU/mS (# CPU) Ran Processes Ran Threads Count Time (mS) Time (mS) Ops Completed Time (mS) Count
18 // 123456789abcdef0 123456789012345678901234567890 1234567 1234567 1234567 1234567 1234567 12345678 123456789 123456789abc 123456789abc 123456789ab 123456789 123456789 1234567 1234567 1234567 123456789abc 123456789abc 1234567 1234567890 123456789 123456
19 // 1119100000.00 76.58 16.53 6.89 0.00 230 112 10000.00 100000.00 100000.00 1.55 2 3 12 13 2280 230.48 1998.22 3318 123.40 MB 0.00
21 const char * time1
= "" ;
22 const char * time2
= "" ;
23 const char * time3
= "" ;
24 char time_buffer1
[ 32 ];
25 char time_buffer2
[ 32 ];
26 char time_buffer3
[ 32 ];
28 // If we're printing the entire data set, don't print a timestamp.
29 if ( globals
. is_summary_start_set () || globals
. is_summary_stop_set () || globals
. is_summary_step_set ()) {
30 sprintf ( time_buffer1
, " %1 6s " , "" );
31 sprintf ( time_buffer2
, " %1 6s " , "" );
32 sprintf ( time_buffer3
, "%-16s " , globals
. should_print_mach_absolute_timestamps () ? "Time(mach-abs)" : "Time(mS)" );
39 dprintf ( globals
. output_fd (), " %s %-30s %7 s %7 s %7 s %7 s %7 s %8 s %9 s %1 2s %1 2s %1 1s %9 s %9 s %7 s %7 s %7 s %1 2s %1 2s %7 s %1 0s %9 s %6 s \n " , time1
, "" , "" , "" , "" , "" , "" , "" , "" , "" , "" , "Avg" , "Actual" , "Wanted" , "Actual" , "Wanted" , "" , "" , "" , "" , "" , "" , "Jetsam" );
40 dprintf ( globals
. output_fd (), " %s %-30s %7 s %7 s %7 s %7 s %7 s %8 s %9 s %1 2s %1 2s %1 1s %9 s %9 s %7 s %7 s %7 s %1 2s %1 2s %7 s %1 0s %9 s %6 s \n " , time2
, "" , "" , "" , "" , "All-CPU" , "" , "" , "Thr Avg" , "Actual" , "Wanted" , "Concurrency" , "Processes" , "To Run" , "Threads" , "To Run" , "VMFault" , "VMFault" , "IO Wait" , "# IO" , "IO Bytes" , "Jetsam" , "Proc" );
41 dprintf ( globals
. output_fd (), " %s %-30s %7 s %7 s %7 s %7 s %7 s %8 s %9 s %1 2s %1 2s %1 1s %9 s %9 s %7 s %7 s %7 s %1 2s %1 2s %7 s %1 0s %9 s %6 s \n " , time3
, "Name" , "Run%" , "Idle%" , "Intr%" , "Idle%" , "#Intr" , "#CSW" , "On CPU/µS" , "CPU/mS" , "CPU/mS" , "(# CPU)" , "Ran" , "Processes" , "Ran" , "Threads" , "Count" , "Time (mS)" , "Time (mS)" , "Ops" , "Completed" , "Time (mS)" , "Count" );