From 25d704f304309dd7585e734823d43071a6c558e5 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Fri, 28 Apr 2000 05:59:25 +0000 Subject: [PATCH] Cleanup tracing. --- sim/ppc/ChangeLog | 7 +++++++ sim/ppc/events.c | 21 ++++++++++++++++++++- sim/ppc/interrupts.c | 2 +- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index 65ff71e3ae9..36bb6564291 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,10 @@ +Fri Apr 28 15:53:54 2000 Andrew Cagney + + * interrupts.c (deliver_hardware_interrupt): Print time trace in + decimal. + * events.c (event_queue_process): Cleanup trace message. + (update_time_from_event): Trace full event queue. + 2000-03-25 Geoff Keating * ppc-instructions (Disabled_Exponent_Underflow): Increment diff --git a/sim/ppc/events.c b/sim/ppc/events.c index 83846222cff..5743ffd799e 100644 --- a/sim/ppc/events.c +++ b/sim/ppc/events.c @@ -161,6 +161,24 @@ update_time_from_event(event_queue *events) events->time_of_event = current_time - 1; events->time_from_event = -1; } + if (WITH_TRACE && ppc_trace[trace_events]) + { + event_entry *event; + int i; + for (event = events->queue, i = 0; + event != NULL; + event = event->next, i++) + { + TRACE(trace_events, ("event time-from-event - time %ld, delta %ld - event %d, tag 0x%lx, time %ld, handler 0x%lx, data 0x%lx\n", + (long)current_time, + (long)events->time_from_event, + i, + (long)event, + (long)event->time_of_event, + (long)event->handler, + (long)event->data)); + } + } ASSERT(current_time == event_queue_time(events)); ASSERT((events->time_from_event >= 0) == (events->queue != NULL)); } @@ -369,9 +387,10 @@ event_queue_process(event_queue *events) event_handler *handler = to_do->handler; void *data = to_do->data; events->queue = to_do->next; - TRACE(trace_events, ("event issued at %ld - tag 0x%lx - handler 0x%lx, data 0x%lx\n", + TRACE(trace_events, ("event issued at %ld - tag 0x%lx - time %ld, handler 0x%lx, data 0x%lx\n", (long)event_time, (long)to_do, + (long)to_do->time_of_event, (long)handler, (long)data)); zfree(to_do); diff --git a/sim/ppc/interrupts.c b/sim/ppc/interrupts.c index deab7e9bf43..681e791af7e 100644 --- a/sim/ppc/interrupts.c +++ b/sim/ppc/interrupts.c @@ -469,7 +469,7 @@ deliver_hardware_interrupt(void *data) unsigned_word cia = cpu_get_program_counter(processor); unsigned_word nia = perform_oea_interrupt(processor, cia, 0x00900, 0, 0, 0, 0); - TRACE(trace_interrupts, ("decrementer interrupt - cia=0x%lx time=0x%lx\n", + TRACE(trace_interrupts, ("decrementer interrupt - cia 0x%lx, time %ld\n", (unsigned long)cia, (unsigned long)event_queue_time(psim_event_queue(cpu_system(processor))) )); -- 2.30.2