Merge zizzer:/bk/newmem
into zeep.pool:/z/saidi/work/m5.newmem --HG-- extra : convert_revision : 8867e78b55670da14f38172b5ac16ed5f6770f4c
This commit is contained in:
commit
b7292a1713
5 changed files with 17 additions and 27 deletions
|
@ -213,7 +213,7 @@ TLB::flushAddr(Addr addr, uint8_t asn)
|
||||||
if (i == lookupTable.end())
|
if (i == lookupTable.end())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
while (i->first == vaddr.vpn()) {
|
while (i != lookupTable.end() && i->first == vaddr.vpn()) {
|
||||||
int index = i->second;
|
int index = i->second;
|
||||||
PTE *pte = &table[index];
|
PTE *pte = &table[index];
|
||||||
assert(pte->valid);
|
assert(pte->valid);
|
||||||
|
@ -225,10 +225,10 @@ TLB::flushAddr(Addr addr, uint8_t asn)
|
||||||
// invalidate this entry
|
// invalidate this entry
|
||||||
pte->valid = false;
|
pte->valid = false;
|
||||||
|
|
||||||
lookupTable.erase(i);
|
lookupTable.erase(i++);
|
||||||
|
} else {
|
||||||
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
++i;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,7 @@
|
||||||
#include "kern/system_events.hh"
|
#include "kern/system_events.hh"
|
||||||
#include "sim/system.hh"
|
#include "sim/system.hh"
|
||||||
|
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
namespace Linux {
|
namespace Linux {
|
||||||
|
|
||||||
|
@ -44,13 +45,11 @@ void
|
||||||
DebugPrintkEvent::process(ThreadContext *tc)
|
DebugPrintkEvent::process(ThreadContext *tc)
|
||||||
{
|
{
|
||||||
if (DTRACE(DebugPrintf)) {
|
if (DTRACE(DebugPrintf)) {
|
||||||
if (!raw) {
|
std::stringstream ss;
|
||||||
StringWrap name(tc->getSystemPtr()->name() + ".dprintk");
|
|
||||||
DPRINTFN("");
|
|
||||||
}
|
|
||||||
|
|
||||||
TheISA::Arguments args(tc);
|
TheISA::Arguments args(tc);
|
||||||
Printk(args);
|
Printk(ss, args);
|
||||||
|
StringWrap name(tc->getSystemPtr()->name() + ".dprintk");
|
||||||
|
DPRINTFN("%s", ss.str());
|
||||||
}
|
}
|
||||||
SkipFuncEvent::process(tc);
|
SkipFuncEvent::process(tc);
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,13 +38,9 @@ namespace Linux {
|
||||||
|
|
||||||
class DebugPrintkEvent : public SkipFuncEvent
|
class DebugPrintkEvent : public SkipFuncEvent
|
||||||
{
|
{
|
||||||
private:
|
|
||||||
bool raw;
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
DebugPrintkEvent(PCEventQueue *q, const std::string &desc, Addr addr,
|
DebugPrintkEvent(PCEventQueue *q, const std::string &desc, Addr addr)
|
||||||
bool r = false)
|
: SkipFuncEvent(q, desc, addr) {}
|
||||||
: SkipFuncEvent(q, desc, addr), raw(r) {}
|
|
||||||
virtual void process(ThreadContext *xc);
|
virtual void process(ThreadContext *xc);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -32,22 +32,18 @@
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "base/trace.hh"
|
|
||||||
#include "arch/arguments.hh"
|
#include "arch/arguments.hh"
|
||||||
|
#include "base/trace.hh"
|
||||||
|
#include "kern/linux/printk.hh"
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Printk(TheISA::Arguments args)
|
Printk(stringstream &out, TheISA::Arguments args)
|
||||||
{
|
{
|
||||||
std::ostream &out = Trace::output();
|
|
||||||
char *p = (char *)args++;
|
char *p = (char *)args++;
|
||||||
|
|
||||||
ios::fmtflags saved_flags = out.flags();
|
|
||||||
char old_fill = out.fill();
|
|
||||||
int old_precision = out.precision();
|
|
||||||
|
|
||||||
while (*p) {
|
while (*p) {
|
||||||
switch (*p) {
|
switch (*p) {
|
||||||
case '%': {
|
case '%': {
|
||||||
|
@ -258,8 +254,5 @@ Printk(TheISA::Arguments args)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
out.flags(saved_flags);
|
|
||||||
out.fill(old_fill);
|
|
||||||
out.precision(old_precision);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -34,8 +34,10 @@
|
||||||
|
|
||||||
#include "arch/isa_specific.hh"
|
#include "arch/isa_specific.hh"
|
||||||
|
|
||||||
|
#include <sstream>
|
||||||
|
|
||||||
class TheISA::Arguments;
|
class TheISA::Arguments;
|
||||||
|
|
||||||
void Printk(TheISA::Arguments args);
|
void Printk(std::stringstream &out, TheISA::Arguments args);
|
||||||
|
|
||||||
#endif // __PRINTK_HH__
|
#endif // __PRINTK_HH__
|
||||||
|
|
Loading…
Reference in a new issue