if (us >= 1000000000) // =>100s
buf->printf(">99s");
else if (us >= 10000000) // >=10s
- buf->printf("%lds", us/1000000);
+ buf->printf("%lus", us/1000000);
else if (us >= 1000000) // >=1s
- buf->printf("%ld.%lds", us/1000000, (us%1000000)/100000);
+ buf->printf("%lu.%lus", us/1000000, (us%1000000)/100000);
else if (us >= 10000) // 10ms
- buf->printf("%ldm", us/1000);
+ buf->printf("%lum", us/1000);
else if (us >= 1000) // 1ms
- buf->printf("%ld.%ldm", us/1000, (us%1000)/100);
+ buf->printf("%lu.%lum", us/1000, (us%1000)/100);
else
- buf->printf("%ld%c", us, Config::char_micro);
+ buf->printf("%lu%c", us, Config::char_micro);
}
template< typename T >
class Tb_entry_ipc_fmt : public Tb_entry_formatter
{
public:
+ Tb_entry_ipc_fmt() {}
void print(String_buffer *, Tb_entry const *) const {}
Group_order has_partner(Tb_entry const *) const
{ return Tb_entry::Group_order::first(); }
class Tb_entry_ipc_res_fmt : public Tb_entry_formatter
{
public:
+ Tb_entry_ipc_res_fmt() {}
void print(String_buffer *, Tb_entry const *) const {}
Group_order has_partner(Tb_entry const *) const
{ return Tb_entry::Group_order::last(); }
// ipc / irq / shortcut success
static
void
-formatter_ipc(String_buffer *buf, Tb_entry *tb, const char *tidstr, unsigned tidlen)
+formatter_ipc(String_buffer *buf, Tb_entry *tb, const char *tidstr, int tidlen)
{
Tb_entry_ipc *e = static_cast<Tb_entry_ipc*>(tb);
unsigned char type = e->ipc_type();
const char *m = get_ipc_type(e);
buf->printf("%s: ", (e->type()==Tbuf_ipc) ? "ipc" : "sc ");
- buf->printf("%s%-*s %s->", /*e->dst().next_period() ? "[NP] " :*/ "", tidlen, tidstr, m);
+ buf->printf("%-*s %s->", tidlen, tidstr, m);
// print destination id
if (e->dst().special())
// result of ipc
static
void
-formatter_ipc_res(String_buffer *buf, Tb_entry *tb, const char *tidstr, unsigned tidlen)
+formatter_ipc_res(String_buffer *buf, Tb_entry *tb, const char *tidstr, int tidlen)
{
Tb_entry_ipc_res *e = static_cast<Tb_entry_ipc_res*>(tb);
L4_error error;
// pagefault
static
void
-formatter_pf(String_buffer *buf, Tb_entry *tb, const char *tidstr, unsigned tidlen)
+formatter_pf(String_buffer *buf, Tb_entry *tb, const char *tidstr, int tidlen)
{
Tb_entry_pf *e = static_cast<Tb_entry_pf*>(tb);
buf->printf("pf: %-*s pfa=" L4_PTR_FMT " ip=" L4_PTR_FMT " (%c%c) spc=%p err=%lx",
// kernel event (enter_kdebug("*..."))
static
void
-formatter_ke(String_buffer *buf, Tb_entry *tb, const char *tidstr, unsigned tidlen)
+formatter_ke(String_buffer *buf, Tb_entry *tb, const char *tidstr, int tidlen)
{
Tb_entry_ke *e = static_cast<Tb_entry_ke*>(tb);
buf->printf("ke: %-*s \"%s\" @ " L4_PTR_FMT,
- tidlen, tidstr, e->msg(), e->ip());
+ tidlen, tidstr, e->msg.str(), e->ip());
}
// kernel event (enter_kdebug_verb("*+...", val1, val2, val3))
static
void
-formatter_ke_reg(String_buffer *buf, Tb_entry *tb, const char *tidstr, unsigned tidlen)
+formatter_ke_reg(String_buffer *buf, Tb_entry *tb, const char *tidstr, int tidlen)
{
Tb_entry_ke_reg *e = static_cast<Tb_entry_ke_reg*>(tb);
buf->printf("ke: %-*s \"%s\" "
L4_PTR_FMT " " L4_PTR_FMT " " L4_PTR_FMT " @ " L4_PTR_FMT,
- tidlen, tidstr, e->msg(), e->v[0], e->v[1], e->v[2],
+ tidlen, tidstr, e->msg.str(), e->v[0], e->v[1], e->v[2],
e->ip());
}
// breakpoint
static
void
-formatter_bp(String_buffer *buf, Tb_entry *tb, const char *tidstr, unsigned tidlen)
+formatter_bp(String_buffer *buf, Tb_entry *tb, const char *tidstr, int tidlen)
{
Tb_entry_bp *e = static_cast<Tb_entry_bp*>(tb);
buf->printf("b%c: %-*s @ " L4_PTR_FMT " ",
Tb_entry_trap::print(String_buffer *buf) const
{
if (!cs())
- buf->printf("#%02x: err=%08x @ " L4_PTR_FMT, trapno(), error(), ip());
+ buf->printf("#%02x: err=%08x @ " L4_PTR_FMT,
+ (unsigned)trapno(), (unsigned)error(), ip());
else
buf->printf(trapno() == 14
? "#%02x: err=%04x @ " L4_PTR_FMT
" cs=%04x sp=" L4_PTR_FMT " cr2=" L4_PTR_FMT
: "#%02x: err=%04x @ " L4_PTR_FMT
" cs=%04x sp=" L4_PTR_FMT " eax=" L4_PTR_FMT,
- trapno(),
- error(), ip(), cs(), sp(),
+ (unsigned)trapno(),
+ (unsigned)error(), ip(), (unsigned)cs(), sp(),
trapno() == 14 ? cr2() : eax());
}
// kernel event log binary data
static
void
-formatter_ke_bin(String_buffer *buf, Tb_entry *tb, const char *tidstr, unsigned tidlen)
+formatter_ke_bin(String_buffer *buf, Tb_entry *tb, const char *tidstr, int tidlen)
{
Tb_entry_ke_bin *e = static_cast<Tb_entry_ke_bin*>(tb);
buf->printf("ke: %-*s BINDATA @ " L4_PTR_FMT, tidlen, tidstr, e->ip());