]>
git.saurik.com Git - apple/system_cmds.git/blob - kdprof/EventPrinting.cpp
5 // Created by James McIlree on 6/6/13.
6 // Copyright (c) 2013 Apple. All rights reserved.
11 void print_event_header(const Globals
& globals
, bool is_64_bit
) {
15 // [Index] Time Type Code arg1 arg2 arg3 arg4 thread cpu# command/IOP-name pid
16 // 8 16 4 34 8/16 8/16 8/16 8/16 10 4 16 6
19 if (globals
.should_print_event_index())
20 dprintf(globals
.output_fd(), "%8s ", "Event#");
22 // The character counting for "Time(µS)" is OBO, it treats the µ as two characters.
23 // This means the %16s misaligns. We force it by making the input string 16 printable chars long,
24 // which overflows the %16s to the correct actual output length.
25 const char* time
= globals
.should_print_mach_absolute_timestamps() ? "Time(mach-abs)" : " Time(µS)";
28 dprintf(globals
.output_fd(), "%16s %4s %-34s %-16s %-16s %-16s %-16s %10s %4s %-16s %-6s\n", time
, "Type", "Code", "arg1", "arg2", "arg3", "arg4", "thread", "cpu#", "command", "pid");
30 dprintf(globals
.output_fd(), "%16s %4s %-34s %-8s %-8s %-8s %-8s %10s %4s %-16s %-6s\n", time
, "Type", "Code", "arg1", "arg2", "arg3", "arg4", "thread", "cpu#", "command", "pid");