pc_event.cc (5882:5a047c3f3795) | pc_event.cc (7720:65d338a8dba4) |
---|---|
1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 69 unchanged lines hidden (view full) --- 78 event->pc(), event->descr()); 79 80 return true; 81} 82 83bool 84PCEventQueue::doService(ThreadContext *tc) 85{ | 1/* 2 * Copyright (c) 2002-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 69 unchanged lines hidden (view full) --- 78 event->pc(), event->descr()); 79 80 return true; 81} 82 83bool 84PCEventQueue::doService(ThreadContext *tc) 85{ |
86 Addr pc = tc->readPC() & ~0x3; | 86 Addr pc = tc->instAddr() & ~0x3; |
87 int serviced = 0; 88 range_t range = equal_range(pc); 89 for (iterator i = range.first; i != range.second; ++i) { 90 // Make sure that the pc wasn't changed as the side effect of 91 // another event. This for example, prevents two invocations 92 // of the SkipFuncEvent. Maybe we should have separate PC 93 // event queues for each processor? | 87 int serviced = 0; 88 range_t range = equal_range(pc); 89 for (iterator i = range.first; i != range.second; ++i) { 90 // Make sure that the pc wasn't changed as the side effect of 91 // another event. This for example, prevents two invocations 92 // of the SkipFuncEvent. Maybe we should have separate PC 93 // event queues for each processor? |
94 if (pc != (tc->readPC() & ~0x3)) | 94 if (pc != (tc->instAddr() & ~0x3)) |
95 continue; 96 97 DPRINTF(PCEvent, "PC based event serviced at %#x: %s\n", 98 (*i)->pc(), (*i)->descr()); 99 100 (*i)->process(tc); 101 ++serviced; 102 } --- 54 unchanged lines hidden --- | 95 continue; 96 97 DPRINTF(PCEvent, "PC based event serviced at %#x: %s\n", 98 (*i)->pc(), (*i)->descr()); 99 100 (*i)->process(tc); 101 ++serviced; 102 } --- 54 unchanged lines hidden --- |