cp_annotate.cc (6658:f4de76601762) | cp_annotate.cc (7823:dac01f14f20f) |
---|---|
1/* 2 * Copyright (c) 2006-2009 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; --- 147 unchanged lines hidden (view full) --- 156 debugSymbolTable->findNearestSymbol( 157 tc->readIntReg(ReturnAddressReg), st, junk); 158 159 CopyStringOut(tc, sm, args[0], 50); 160 System *sys = tc->getSystemPtr(); 161 StringWrap name(sys->name()); 162 163 if (!sm[0]) | 1/* 2 * Copyright (c) 2006-2009 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; --- 147 unchanged lines hidden (view full) --- 156 debugSymbolTable->findNearestSymbol( 157 tc->readIntReg(ReturnAddressReg), st, junk); 158 159 CopyStringOut(tc, sm, args[0], 50); 160 System *sys = tc->getSystemPtr(); 161 StringWrap name(sys->name()); 162 163 if (!sm[0]) |
164 warn("Got null SM at tick %d\n", curTick); | 164 warn("Got null SM at tick %d\n", curTick()); |
165 166 int sysi = getSys(sys); 167 int smi = getSm(sysi, sm, args[1]); 168 DPRINTF(Annotate, "Starting machine: %s(%d) sysi: %d id: %#x\n", sm, 169 smi, sysi, args[1]); 170 DPRINTF(Annotate, "smMap[%d] = %d, %s, %#x\n", smi, 171 smMap[smi-1].first, smMap[smi-1].second.first, 172 smMap[smi-1].second.second); --- 95 unchanged lines hidden (view full) --- 268 DPRINTF(Annotate, "State Machine not unwinding correctly. sid: %d, %#x" 269 " top of stack: %s Current Stack:\n", 270 sysi, frame, smMap[smib-1].second.first); 271 for (int x = smStack[sid].size()-1; x >= 0; x--) 272 DPRINTF(Annotate, "-- %d\n", smStack[sid][x]); 273 DPRINTF(Annotate, "Ending machine: %s; end stack: %s\n", sm, 274 smMap[smib-1].second.first); 275 | 165 166 int sysi = getSys(sys); 167 int smi = getSm(sysi, sm, args[1]); 168 DPRINTF(Annotate, "Starting machine: %s(%d) sysi: %d id: %#x\n", sm, 169 smi, sysi, args[1]); 170 DPRINTF(Annotate, "smMap[%d] = %d, %s, %#x\n", smi, 171 smMap[smi-1].first, smMap[smi-1].second.first, 172 smMap[smi-1].second.second); --- 95 unchanged lines hidden (view full) --- 268 DPRINTF(Annotate, "State Machine not unwinding correctly. sid: %d, %#x" 269 " top of stack: %s Current Stack:\n", 270 sysi, frame, smMap[smib-1].second.first); 271 for (int x = smStack[sid].size()-1; x >= 0; x--) 272 DPRINTF(Annotate, "-- %d\n", smStack[sid][x]); 273 DPRINTF(Annotate, "Ending machine: %s; end stack: %s\n", sm, 274 smMap[smib-1].second.first); 275 |
276 warn("State machine stack not unwinding correctly at %d\n", curTick); | 276 warn("State machine stack not unwinding correctly at %d\n", curTick()); |
277 } else { 278 DPRINTF(Annotate, 279 "State machine ending:%s sysi:%d id:%#x back:%d getSm:%d\n", 280 sm, sysi, smMap[smib-1].second.second, smStack[sid].back(), 281 getSm(sysi, sm, smMap[smib-1].second.second)); 282 assert(getSm(sysi, sm, smMap[smib-1].second.second) == 283 smStack[sid].back()); 284 --- 26 unchanged lines hidden (view full) --- 311 Arguments args(tc); 312 char st[50]; 313 CopyStringOut(tc, st, args[1], 50); 314 315 StringWrap name(tc->getSystemPtr()->name()); 316 DPRINTF(Annotate, "Explict begin of state %s\n", st); 317 uint32_t flags = args[0]; 318 if (flags & FL_BAD) | 277 } else { 278 DPRINTF(Annotate, 279 "State machine ending:%s sysi:%d id:%#x back:%d getSm:%d\n", 280 sm, sysi, smMap[smib-1].second.second, smStack[sid].back(), 281 getSm(sysi, sm, smMap[smib-1].second.second)); 282 assert(getSm(sysi, sm, smMap[smib-1].second.second) == 283 smStack[sid].back()); 284 --- 26 unchanged lines hidden (view full) --- 311 Arguments args(tc); 312 char st[50]; 313 CopyStringOut(tc, st, args[1], 50); 314 315 StringWrap name(tc->getSystemPtr()->name()); 316 DPRINTF(Annotate, "Explict begin of state %s\n", st); 317 uint32_t flags = args[0]; 318 if (flags & FL_BAD) |
319 warn("BAD state encountered: at cycle %d: %s\n", curTick, st); | 319 warn("BAD state encountered: at cycle %d: %s\n", curTick(), st); |
320 swBegin(tc->getSystemPtr(), tc->contextId(), st, getFrame(tc), true, args[0]); 321} 322 323void 324CPA::swAutoBegin(ThreadContext *tc, Addr next_pc) 325{ 326 if (!enabled()) 327 return; --- 355 unchanged lines hidden (view full) --- 683 while (ai != qData[qi-1].end()) { 684 DPRINTF(AnnotateQ, "--Element %d size %d\n", x, (*ai)->data); 685 ai++; 686 x++; 687 } 688 689 warn("%d: Queue Assert: SW said there should be %d byte(s) in %s," 690 "however there are %d byte(s)\n", | 320 swBegin(tc->getSystemPtr(), tc->contextId(), st, getFrame(tc), true, args[0]); 321} 322 323void 324CPA::swAutoBegin(ThreadContext *tc, Addr next_pc) 325{ 326 if (!enabled()) 327 return; --- 355 unchanged lines hidden (view full) --- 683 while (ai != qData[qi-1].end()) { 684 DPRINTF(AnnotateQ, "--Element %d size %d\n", x, (*ai)->data); 685 ai++; 686 x++; 687 } 688 689 warn("%d: Queue Assert: SW said there should be %d byte(s) in %s," 690 "however there are %d byte(s)\n", |
691 curTick, size, q, qBytes[qi-1]); | 691 curTick(), size, q, qBytes[qi-1]); |
692 DPRINTF(AnnotateQ, "%d: Queue Assert: SW said there should be %d" 693 " byte(s) in %s, however there are %d byte(s)\n", | 692 DPRINTF(AnnotateQ, "%d: Queue Assert: SW said there should be %d" 693 " byte(s) in %s, however there are %d byte(s)\n", |
694 curTick, size, q, qBytes[qi-1]); | 694 curTick(), size, q, qBytes[qi-1]); |
695 } 696} 697 698void 699CPA::swLink(ThreadContext *tc) 700{ 701 if (!enabled()) 702 return; --- 105 unchanged lines hidden (view full) --- 808 doSwSmEnd(tc->getSystemPtr(), tc->contextId(), sm, getFrame(tc)); 809 } 810} 811 812CPA::AnnDataPtr 813CPA::add(int t, int f, int c, int sm, int stq, int32_t d) 814{ 815 AnnDataPtr an = new AnnotateData; | 695 } 696} 697 698void 699CPA::swLink(ThreadContext *tc) 700{ 701 if (!enabled()) 702 return; --- 105 unchanged lines hidden (view full) --- 808 doSwSmEnd(tc->getSystemPtr(), tc->contextId(), sm, getFrame(tc)); 809 } 810} 811 812CPA::AnnDataPtr 813CPA::add(int t, int f, int c, int sm, int stq, int32_t d) 814{ 815 AnnDataPtr an = new AnnotateData; |
816 an->time = curTick; | 816 an->time = curTick(); |
817 an->data = d; 818 an->orig_data = d; 819 an->op = t; 820 an->flag = f; 821 an->sm = sm; 822 an->stq = stq; 823 an->cpu = c; 824 an->dump = true; --- 581 unchanged lines hidden --- | 817 an->data = d; 818 an->orig_data = d; 819 an->op = t; 820 an->flag = f; 821 an->sm = sm; 822 an->stq = stq; 823 an->cpu = c; 824 an->dump = true; --- 581 unchanged lines hidden --- |