* Authors: Ali Saidi
*/
-#include "arch/alpha/linux/threadinfo.hh"
+#include "arch/generic/linux/threadinfo.hh"
#include "arch/utility.hh"
#include "base/loader/object_file.hh"
#include "base/callback.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
#include "cpu/thread_context.hh"
+#include "debug/Annotate.hh"
+#include "debug/AnnotateVerbose.hh"
#include "sim/arguments.hh"
#include "sim/core.hh"
#include "sim/sim_exit.hh"
registerExitCallback(new AnnotateDumpCallback(this));
}
+
+uint64_t
+CPA::getFrame(ThreadContext *tc)
+{
+ // This code is ISA specific and will need to be changed
+ // if the annotation code is used for something other than Alpha
+ return (tc->readMiscRegNoEffect(TheISA::IPR_PALtemp23) &
+ ~ULL(0x3FFF));
+
+}
+
void
CPA::swSmBegin(ThreadContext *tc)
{
string sym;
Addr sym_addr = 0;
- SymbolTable *symtab = NULL;
-
if (!TheISA::inUserMode(tc)) {
debugSymbolTable->findNearestSymbol(next_pc, sym, sym_addr);
- symtab = debugSymbolTable;
} else {
Linux::ThreadInfo ti(tc);
string app = ti.curTaskName();
paramIn(cp, section, csprintf("nameCache%d.str", x), str);
paramIn(cp, section, csprintf("nameCache%d.int", x), sysi);
- nameCache[sys] = std::make_pair<std::string,int>(str, sysi);
+ nameCache[sys] = std::make_pair(str, sysi);
}
//smStack (SmStack)
/*
+ * Copyright (c) 2014 ARM Limited
+ * All rights reserved.
+ *
+ * The license below extends only to copyright in the software and shall
+ * not be construed as granting a license to any other intellectual
+ * property including but not limited to intellectual property relating
+ * to a hardware implementation of the functionality of the software
+ * licensed hereunder. You may use the software subject to the license
+ * terms below provided that you ensure that this notice is replicated
+ * unmodified and in its entirety in all distributions of the software,
+ * modified or unmodified, in source code or in binary form.
+ *
* Copyright (c) 2006-2009 The Regents of The University of Michigan
* All rights reserved.
*
#include "base/hashmap.hh"
#include "base/trace.hh"
#include "base/types.hh"
+#include "debug/AnnotateQ.hh"
#include "config/cp_annotate.hh"
#include "config/the_isa.hh"
#include "sim/serialize.hh"
int32_t count = 1) { return; }
};
#else
+
+/**
+ * Provide a hash function for the CPI Id type
+ */
+__hash_namespace_begin
+template <>
+struct hash<std::pair<std::string, uint64_t> >
+{
+
+ size_t
+ operator()(const std::pair<std::string, uint64_t>& x) const
+ {
+ return hash<std::string>()(x.first);
+ }
+
+};
+__hash_namespace_end
+
class CPA : SimObject
{
public:
if (smi == 0) {
smCache[sysi-1][smid] = smi = ++numSm;
assert(smi < 65535);
- smMap.push_back(std::make_pair<int, Id>(sysi, smid));
+ smMap.push_back(std::make_pair(sysi, smid));
}
return smi;
}
{
NameCache::iterator i = nameCache.find(s);
if (i == nameCache.end()) {
- nameCache[s] = std::make_pair<std::string,int>(s->name(), ++numSys);
+ nameCache[s] = std::make_pair(s->name(), ++numSys);
i = nameCache.find(s);
// might need to put smstackid into map here, but perhaps not
//smStack.push_back(std::vector<int>());
qBytes.push_back(0);
qData.push_back(AnnotateList());
numQ[sys-1]++;
- qMap.push_back(std::make_pair<int, Id>(sys, qid));
+ qMap.push_back(std::make_pair(sys, qid));
}
return qi;
}
CPA(Params *p);
void startup();
- // This code is ISA specific and will need to be changed
- // if the annotation code is used for something other than Alpha
- inline uint64_t getFrame(ThreadContext *tc)
- { return (tc->readMiscRegNoEffect(TheISA::IPR_PALtemp23) &
- ~ULL(0x3FFF)); }
+ uint64_t getFrame(ThreadContext *tc);
static bool available() { return true; }