#include <sim/init_signals.hh>
#include <sim/system.hh>
#include <sim/sim_object.hh>
-#include <base/misc.hh>
+#include <base/logging.hh>
#include <base/debug.hh>
#ifdef fatal // gem5 sets this
#include <cassert>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/thread_context.hh"
#include "params/AlphaISA.hh"
#include "sim/serialize.hh"
*/
#include "arch/alpha/registers.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "mem/packet.hh"
#include "mem/request.hh"
#include "arch/isa_traits.hh"
#include "base/bitfield.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
namespace AlphaISA
#include "arch/alpha/isa_traits.hh"
#include "base/loader/elf_object.hh"
#include "base/loader/object_file.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/thread_context.hh"
#include "debug/Loader.hh"
#include "mem/page_table.hh"
#define __ARCH_ALPHA_PSEUDO_INST_HH__
#include "arch/generic/pseudo_inst.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
class ThreadContext;
#include "arch/alpha/isa_traits.hh"
#include "arch/alpha/registers.hh"
#include "arch/alpha/types.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/static_inst.hh"
#include "cpu/thread_context.hh"
#include "arch/alpha/ev5.hh"
#include "arch/arm/miscregs.hh"
#include "arch/arm/pagetable.hh"
#include "arch/arm/types.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "sim/faults.hh"
#include "sim/full_system.hh"
#include "arch/arm/isa_device.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
namespace ArmISA
{
#include <tuple>
#include "arch/arm/isa.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/thread_context.hh"
#include "sim/full_system.hh"
#include "arch/arm/types.hh"
#include "base/loader/elf_object.hh"
#include "base/loader/object_file.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/thread_context.hh"
#include "debug/Stack.hh"
#include "mem/page_table.hh"
#define __ARCH_ARM_PSEUDO_INST_HH__
#include "arch/generic/pseudo_inst.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
class ThreadContext;
#include "arch/generic/types.hh"
#include "base/bitunion.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "debug/Decoder.hh"
#include "arch/arm/isa_traits.hh"
#include "arch/arm/miscregs.hh"
#include "arch/arm/types.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "base/types.hh"
#include "cpu/static_inst.hh"
#include <string>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "sim/faults.hh"
namespace GenericISA
#include "arch/generic/pseudo_inst.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
class ThreadContext;
#ifndef __ARCH_GENERIC_TLB_HH__
#define __ARCH_GENERIC_TLB_HH__
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "mem/request.hh"
#include "sim/sim_object.hh"
#include <vector>
#include "base/cprintf.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
template <size_t Sz>
class VecRegContainer;
#include <cstdint>
#include "arch/hsail/gpu_types.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "gpu-compute/misc.hh"
namespace HsailISA
#include "arch/generic/decode_cache.hh"
#include "arch/mips/types.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "cpu/static_inst.hh"
#include "arch/mips/isa_traits.hh"
#include "base/bitfield.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/static_inst.hh"
#include "sim/serialize.hh"
#include "arch/mips/isa_traits.hh"
#include "arch/mips/types.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
class ThreadContext;
#include "arch/mips/faults.hh"
#include "base/compiler.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "params/MipsInterrupts.hh"
#include "sim/serialize.hh"
#include "sim/sim_object.hh"
*/
#include "arch/registers.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/LLSC.hh"
#include "mem/packet.hh"
#include "arch/mips/pra_constants.hh"
#include "arch/mips/registers.hh"
#include "base/bitfield.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
namespace MipsISA
#ifndef __ARCH_MIPS_PAGETABLE_H__
#define __ARCH_MIPS_PAGETABLE_H__
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "sim/serialize.hh"
#include "arch/mips/isa_traits.hh"
#include "base/loader/elf_object.hh"
#include "base/loader/object_file.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/thread_context.hh"
#include "debug/Loader.hh"
#include "mem/page_table.hh"
#define __ARCH_MIPS_PSEUDO_INST_HH__
#include "arch/generic/pseudo_inst.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
class ThreadContext;
#include "arch/generic/vec_reg.hh"
#include "arch/mips/generated/max_inst_regs.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
class ThreadContext;
#include "arch/mips/registers.hh"
#include "arch/mips/vtophys.hh"
#include "base/bitfield.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/static_inst.hh"
#include "cpu/thread_context.hh"
#include "mem/fs_translating_port_proxy.hh"
#define __ARCH_MIPS_UTILITY_HH__
#include "arch/mips/isa_traits.hh"
#include "arch/mips/types.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "cpu/static_inst.hh"
#include "cpu/thread_context.hh"
#ifndef __ARCH_POWER_INTERRUPT_HH__
#define __ARCH_POWER_INTERRUPT_HH__
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "params/PowerInterrupts.hh"
#include "sim/sim_object.hh"
#include "arch/power/registers.hh"
#include "arch/power/types.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/reg_class.hh"
#include "sim/sim_object.hh"
#include "arch/power/types.hh"
#include "base/loader/elf_object.hh"
#include "base/loader/object_file.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/thread_context.hh"
#include "debug/Stack.hh"
#include "mem/page_table.hh"
#define __ARCH_POWER_PSEUDO_INST_HH__
#include "arch/generic/pseudo_inst.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
class ThreadContext;
#include "arch/power/utility.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
namespace PowerISA {
#include "arch/generic/decode_cache.hh"
#include "arch/riscv/isa_traits.hh"
#include "arch/riscv/types.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "cpu/static_inst.hh"
#include "debug/Decode.hh"
#ifndef __ARCH_RISCV_INTERRUPT_HH__
#define __ARCH_RISCV_INTERRUPT_HH__
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "params/RiscvInterrupts.hh"
#include "sim/sim_object.hh"
#include "arch/riscv/registers.hh"
#include "arch/riscv/types.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/reg_class.hh"
#include "sim/sim_object.hh"
#include <stack>
#include "arch/registers.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/LLSC.hh"
#include "mem/packet.hh"
#ifndef __ARCH_RISCV_PAGETABLE_H__
#define __ARCH_RISCV_PAGETABLE_H__
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "sim/serialize.hh"
#include "arch/riscv/isa_traits.hh"
#include "base/loader/elf_object.hh"
#include "base/loader/object_file.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/thread_context.hh"
#include "debug/Stack.hh"
#include "mem/page_table.hh"
#define __ARCH_RISCV_PSEUDO_INST_HH__
#include "arch/generic/pseudo_inst.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
class ThreadContext;
#include "arch/sparc/isa_traits.hh"
#include "arch/sparc/registers.hh"
#include "base/condcodes.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/static_inst.hh"
#include "mem/packet.hh"
#include "mem/request.hh" // some constructors use MemReq flags
#include "arch/isa_traits.hh"
#include "base/bitfield.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
namespace SparcISA
#include "arch/sparc/isa_traits.hh"
#include "base/bitfield.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
class Checkpoint;
#include "arch/sparc/types.hh"
#include "base/loader/elf_object.hh"
#include "base/loader/object_file.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/thread_context.hh"
#include "debug/Stack.hh"
#include "mem/page_table.hh"
#define __ARCH_SPARC_PSEUDO_INST_HH__
#include "arch/generic/pseudo_inst.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
class ThreadContext;
#include "arch/generic/tlb.hh"
#include "arch/sparc/asi.hh"
#include "arch/sparc/tlb_map.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "mem/request.hh"
#include "params/SparcTLB.hh"
#include "arch/sparc/registers.hh"
#include "arch/sparc/tlb.hh"
#include "base/bitfield.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/static_inst.hh"
#include "cpu/thread_context.hh"
#include "sim/full_system.hh"
#include "arch/x86/bios/intelmp.hh"
#include "arch/x86/isa_traits.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "mem/port_proxy.hh"
#include "sim/byteswap.hh"
#include "arch/x86/decoder.hh"
#include "arch/x86/regs/misc.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "base/types.hh"
#include "debug/Decoder.hh"
#include "arch/x86/regs/misc.hh"
#include "arch/x86/types.hh"
#include "base/bitfield.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "base/types.hh"
#include "cpu/decode_cache.hh"
#include <cassert>
-#include "base/misc.hh"
+#include "base/logging.hh"
using namespace X86ISA;
#include "arch/x86/tlb.hh"
#include "base/bitunion.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "sim/faults.hh"
namespace X86ISA
#include "arch/x86/registers.hh"
#include "arch/x86/types.hh"
#include "arch/x86/utility.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/static_inst.hh"
#include "mem/packet.hh"
#include "sim/faults.hh"
#include "arch/x86/tlb.hh"
#include "base/loader/symtab.hh"
#include "base/cprintf.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/thread_context.hh" // for Jump::branchTarget()
#include "mem/packet.hh"
#include "sim/full_system.hh"
#include "arch/x86/types.hh"
#include "base/loader/elf_object.hh"
#include "base/loader/object_file.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "cpu/thread_context.hh"
#include "debug/Stack.hh"
#include "arch/x86/x86_traits.hh"
#include "base/bitunion.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "sim/core.hh"
namespace X86ISA
Source('inet.cc')
Source('inifile.cc')
Source('intmath.cc')
+Source('logging.cc')
Source('match.cc')
-Source('misc.cc')
Source('output.cc')
Source('pollevent.cc')
Source('random.cc')
#include "base/bitfield.hh"
#include "base/cprintf.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
/**
#include <iostream>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#ifndef __BASE_BIGINT_HH__
#include <cassert>
-#include "base/misc.hh"
+#include "base/logging.hh"
const char* BmpWriter::_imgExtension = "bmp";
#include <cassert>
#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "sim/serialize.hh"
/**
#include <csignal>
#include "base/cprintf.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
using namespace std;
#include <cstring>
#include <string>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/str.hh"
#include "base/types.hh"
*/
#include "base/imgwriter.hh"
-#include "base/bmpwriter.hh"
-#include "base/misc.hh"
+#include "base/bmpwriter.hh"
+#include "base/logging.hh"
#include "config/use_png.hh"
#if USE_PNG
#include "base/pngwriter.hh"
+
#endif
std::unique_ptr<ImgWriter>
#include <cassert>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
// Returns the prime number one less than n.
#include <string>
#include "base/loader/symtab.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "base/types.hh"
#include "debug/Loader.hh"
#include "base/bitfield.hh"
#include "base/loader/symtab.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/Loader.hh"
#include "gelf.h"
#include <limits>
#include <string>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
class PortProxy;
#include <string>
#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/str.hh"
#include "base/types.hh"
#include "sim/serialize.hh"
--- /dev/null
+/*
+ * Copyright (c) 2014, 2017 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) 2002-2005 The Regents of The University of Michigan
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Authors: Nathan Binkert
+ * Andreas Sandberg
+ */
+
+#include "base/logging.hh"
+
+#include <array>
+
+#include "base/hostinfo.hh"
+#include "base/output.hh"
+#include "base/trace.hh"
+#include "base/types.hh"
+#include "sim/core.hh"
+
+void
+Logger::setLevel(LogLevel ll)
+{
+ for (int i = 0; i < NUM_LOG_LEVELS; ++i)
+ get(LogLevel(i)).enabled = (i <= ll);
+}
+
+static void
+newline_if_needed(std::ostream &stream, const char *format)
+{
+ const size_t format_len(strlen(format));
+
+ switch (format_len ? format[format_len - 1] : '\0') {
+ case '\n':
+ case '\r':
+ break;
+ default:
+ stream << std::endl;
+ }
+}
+
+Logger::Logger(std::ostream &_stream, const char *_prefix)
+ : enabled(true), verbose(false), stream(_stream), prefix(_prefix)
+{
+}
+
+void
+Logger::printEpilogue(const char *func, const char *file, int line,
+ const char *format)
+{
+ newline_if_needed(stream, format);
+
+ if (verbose) {
+ ccprintf(stream, " @ tick %d\n[%s:%s, line %d]\n",
+ curTick(), func, file, line);
+ }
+}
+
+class ExitLogger : public Logger
+{
+ public:
+ using Logger::Logger;
+
+ void printEpilogue(const char *func, const char *file, int line,
+ const char *format) override;
+};
+
+void
+ExitLogger::printEpilogue(const char *func, const char *file, int line,
+ const char *format)
+{
+ Logger::printEpilogue(func, file, line, format);
+
+ ccprintf(stream, "Memory Usage: %ld KBytes\n", memUsage());
+}
+
+Logger &
+Logger::get(LogLevel ll)
+{
+ static std::array<Logger *, NUM_LOG_LEVELS> loggers{{
+ new ExitLogger(std::cerr, "panic"),
+ new ExitLogger(std::cerr, "fatal"),
+ new Logger(std::cerr, "warn"),
+ new Logger(std::cerr, "info"),
+ new Logger(std::cerr, "hack"),
+ }};
+
+ return *loggers[ll];
+}
--- /dev/null
+/*
+ * Copyright (c) 2014, 2017 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) 2002-2005 The Regents of The University of Michigan
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met: redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer;
+ * redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution;
+ * neither the name of the copyright holders nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Authors: Nathan Binkert
+ * Dave Greene
+ * Andreas Sandberg
+ */
+
+#ifndef __BASE_LOGGING_HH__
+#define __BASE_LOGGING_HH__
+
+#include <cassert>
+#include <cstdlib>
+#include <iostream>
+#include <utility>
+
+#include "base/compiler.hh"
+#include "base/cprintf.hh"
+
+#if defined(__SUNPRO_CC)
+#define __FUNCTION__ "how to fix me?"
+#endif
+
+class Logger
+{
+ public:
+ enum LogLevel {
+ PANIC = 0,
+ FATAL,
+ WARN,
+ INFO,
+ HACK,
+ NUM_LOG_LEVELS,
+ };
+
+ /**
+ * Set the active log level.
+ *
+ * All levels that are lower or equal to the selected log level
+ * will be activated.
+ *
+ * @param ll Maximum log level to print
+ */
+ static void setLevel(LogLevel ll);
+
+ /**
+ * Get a Logger corresponding to a specific log level
+ *
+ * @param ll Log level to access
+ * @return Reference to the requested logger
+ */
+ static Logger &get(LogLevel ll);
+
+ public:
+ Logger(std::ostream &stream, const char *prefix);
+ virtual ~Logger() {};
+
+ template<typename ...Args> void
+ print(const char *func, const char *file, int line,
+ const char *format, const Args &...args)
+ {
+ if (!enabled)
+ return;
+
+ if (prefix)
+ stream << prefix << ": ";
+ ccprintf(stream, format, args...);
+
+ printEpilogue(func, file, line, format);
+ }
+
+ template<typename ...Args> void
+ print(const char *func, const char *file, int line,
+ const std::string &format, const Args &...args)
+ {
+ print(func, file, line, format.c_str(), args...);
+ }
+
+ protected:
+ virtual void printEpilogue(const char *func, const char *file, int line,
+ const char *format);
+
+ public:
+ bool enabled;
+ bool verbose;
+
+ protected:
+ std::ostream &stream;
+ const char *prefix;
+};
+
+#define exit_message(logger, code, ...) \
+ do { \
+ logger.print(__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); \
+ if (code < 0) \
+ ::abort(); \
+ else \
+ ::exit(code); \
+ } while (0)
+
+//
+// This implements a cprintf based panic() function. panic() should
+// be called when something happens that should never ever happen
+// regardless of what the user does (i.e., an acutal m5 bug). panic()
+// calls abort which can dump core or enter the debugger.
+//
+//
+#define panic(...) exit_message(::Logger::get(::Logger::PANIC), -1, \
+ __VA_ARGS__)
+
+//
+// This implements a cprintf based fatal() function. fatal() should
+// be called when the simulation cannot continue due to some condition
+// that is the user's fault (bad configuration, invalid arguments,
+// etc.) and not a simulator bug. fatal() calls abort() like
+// panic() does.
+//
+#define fatal(...) exit_message(::Logger::get(::Logger::FATAL), 1, \
+ __VA_ARGS__)
+
+/**
+ * Conditional panic macro that checks the supplied condition and only panics
+ * if the condition is true and allows the programmer to specify diagnostic
+ * printout. Useful to replace if + panic, or if + print + assert, etc.
+ *
+ * @param cond Condition that is checked; if true -> panic
+ * @param ... Printf-based format string with arguments, extends printout.
+ */
+#define panic_if(cond, ...) \
+ do { \
+ if ((cond)) { \
+ panic("panic condition " # cond " occurred: %s", \
+ csprintf(__VA_ARGS__)); \
+ } \
+ } while (0)
+
+
+/**
+ * Conditional fatal macro that checks the supplied condition and only causes a
+ * fatal error if the condition is true and allows the programmer to specify
+ * diagnostic printout. Useful to replace if + fatal, or if + print + assert,
+ * etc.
+ *
+ * @param cond Condition that is checked; if true -> fatal
+ * @param ... Printf-based format string with arguments, extends printout.
+ */
+#define fatal_if(cond, ...) \
+ do { \
+ if ((cond)) { \
+ fatal("fatal condition " # cond " occurred: %s", \
+ csprintf(__VA_ARGS__)); \
+ } \
+ } while (0)
+
+
+#define base_message(logger, ...) \
+ logger.print(__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
+
+// Only print the message the first time this expression is
+// encountered. i.e. This doesn't check the string itself and
+// prevent duplicate strings, this prevents the statement from
+// happening more than once. So, even if the arguments change and that
+// would have resulted in a different message thoes messages would be
+// supressed.
+#define base_message_once(...) do { \
+ static bool once = false; \
+ if (!once) { \
+ base_message(__VA_ARGS__); \
+ once = true; \
+ } \
+ } while (0)
+
+
+#define warn(...) \
+ base_message(::Logger::get(::Logger::WARN), __VA_ARGS__)
+#define inform(...) \
+ base_message(::Logger::get(::Logger::INFO), __VA_ARGS__)
+#define hack(...) \
+ base_message(::Logger::get(::Logger::HACK), __VA_ARGS__)
+
+#define warn_once(...) \
+ base_message_once(::Logger::get(::Logger::WARN), __VA_ARGS__)
+#define inform_once(...) \
+ base_message_once(::Logger::get(::Logger::INFO), __VA_ARGS__)
+#define hack_once(...) \
+ base_message_once(::Logger::get(::Logger::HACK), __VA_ARGS__)
+
+/**
+ * Conditional warning macro that checks the supplied condition and
+ * only prints a warning if the condition is true. Useful to replace
+ * if + warn.
+ *
+ * @param cond Condition that is checked; if true -> warn
+ * @param ... Printf-based format string with arguments, extends printout.
+ */
+#define warn_if(cond, ...) \
+ do { \
+ if ((cond)) \
+ warn(__VA_ARGS__); \
+ } while (0)
+
+/**
+ * The chatty assert macro will function like a normal assert, but will allow
+ * the specification of additional, helpful material to aid debugging why the
+ * assertion actually failed. Like the normal assertion, the chatty_assert
+ * will not be active in fast builds.
+ *
+ * @param cond Condition that is checked; if false -> assert
+ * @param ... Printf-based format string with arguments, extends printout.
+ */
+#ifdef NDEBUG
+#define chatty_assert(cond, ...)
+#else //!NDEBUG
+#define chatty_assert(cond, ...) \
+ do { \
+ if (!(cond)) \
+ panic("assert(" # cond ") failed: %s", csprintf(__VA_ARGS__)); \
+ } while (0)
+#endif // NDEBUG
+#endif // __BASE_LOGGING_HH__
+++ /dev/null
-/*
- * Copyright (c) 2014, 2017 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) 2002-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Nathan Binkert
- * Andreas Sandberg
- */
-
-#include "base/misc.hh"
-
-#include <array>
-
-#include "base/hostinfo.hh"
-#include "base/output.hh"
-#include "base/trace.hh"
-#include "base/types.hh"
-#include "sim/core.hh"
-
-void
-Logger::setLevel(LogLevel ll)
-{
- for (int i = 0; i < NUM_LOG_LEVELS; ++i)
- get(LogLevel(i)).enabled = (i <= ll);
-}
-
-static void
-newline_if_needed(std::ostream &stream, const char *format)
-{
- const size_t format_len(strlen(format));
-
- switch (format_len ? format[format_len - 1] : '\0') {
- case '\n':
- case '\r':
- break;
- default:
- stream << std::endl;
- }
-}
-
-Logger::Logger(std::ostream &_stream, const char *_prefix)
- : enabled(true), verbose(false), stream(_stream), prefix(_prefix)
-{
-}
-
-void
-Logger::printEpilogue(const char *func, const char *file, int line,
- const char *format)
-{
- newline_if_needed(stream, format);
-
- if (verbose) {
- ccprintf(stream, " @ tick %d\n[%s:%s, line %d]\n",
- curTick(), func, file, line);
- }
-}
-
-class ExitLogger : public Logger
-{
- public:
- using Logger::Logger;
-
- void printEpilogue(const char *func, const char *file, int line,
- const char *format) override;
-};
-
-void
-ExitLogger::printEpilogue(const char *func, const char *file, int line,
- const char *format)
-{
- Logger::printEpilogue(func, file, line, format);
-
- ccprintf(stream, "Memory Usage: %ld KBytes\n", memUsage());
-}
-
-Logger &
-Logger::get(LogLevel ll)
-{
- static std::array<Logger *, NUM_LOG_LEVELS> loggers{{
- new ExitLogger(std::cerr, "panic"),
- new ExitLogger(std::cerr, "fatal"),
- new Logger(std::cerr, "warn"),
- new Logger(std::cerr, "info"),
- new Logger(std::cerr, "hack"),
- }};
-
- return *loggers[ll];
-}
+++ /dev/null
-/*
- * Copyright (c) 2014, 2017 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) 2002-2005 The Regents of The University of Michigan
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met: redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer;
- * redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution;
- * neither the name of the copyright holders nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Authors: Nathan Binkert
- * Dave Greene
- * Andreas Sandberg
- */
-
-#ifndef __BASE_MISC_HH__
-#define __BASE_MISC_HH__
-
-#include <cassert>
-#include <cstdlib>
-#include <iostream>
-#include <utility>
-
-#include "base/compiler.hh"
-#include "base/cprintf.hh"
-
-#if defined(__SUNPRO_CC)
-#define __FUNCTION__ "how to fix me?"
-#endif
-
-class Logger
-{
- public:
- enum LogLevel {
- PANIC = 0,
- FATAL,
- WARN,
- INFO,
- HACK,
- NUM_LOG_LEVELS,
- };
-
- /**
- * Set the active log level.
- *
- * All levels that are lower or equal to the selected log level
- * will be activated.
- *
- * @param ll Maximum log level to print
- */
- static void setLevel(LogLevel ll);
-
- /**
- * Get a Logger corresponding to a specific log level
- *
- * @param ll Log level to access
- * @return Reference to the requested logger
- */
- static Logger &get(LogLevel ll);
-
- public:
- Logger(std::ostream &stream, const char *prefix);
- virtual ~Logger() {};
-
- template<typename ...Args> void
- print(const char *func, const char *file, int line,
- const char *format, const Args &...args)
- {
- if (!enabled)
- return;
-
- if (prefix)
- stream << prefix << ": ";
- ccprintf(stream, format, args...);
-
- printEpilogue(func, file, line, format);
- }
-
- template<typename ...Args> void
- print(const char *func, const char *file, int line,
- const std::string &format, const Args &...args)
- {
- print(func, file, line, format.c_str(), args...);
- }
-
- protected:
- virtual void printEpilogue(const char *func, const char *file, int line,
- const char *format);
-
- public:
- bool enabled;
- bool verbose;
-
- protected:
- std::ostream &stream;
- const char *prefix;
-};
-
-#define exit_message(logger, code, ...) \
- do { \
- logger.print(__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__); \
- if (code < 0) \
- ::abort(); \
- else \
- ::exit(code); \
- } while (0)
-
-//
-// This implements a cprintf based panic() function. panic() should
-// be called when something happens that should never ever happen
-// regardless of what the user does (i.e., an acutal m5 bug). panic()
-// calls abort which can dump core or enter the debugger.
-//
-//
-#define panic(...) exit_message(::Logger::get(::Logger::PANIC), -1, \
- __VA_ARGS__)
-
-//
-// This implements a cprintf based fatal() function. fatal() should
-// be called when the simulation cannot continue due to some condition
-// that is the user's fault (bad configuration, invalid arguments,
-// etc.) and not a simulator bug. fatal() calls abort() like
-// panic() does.
-//
-#define fatal(...) exit_message(::Logger::get(::Logger::FATAL), 1, \
- __VA_ARGS__)
-
-/**
- * Conditional panic macro that checks the supplied condition and only panics
- * if the condition is true and allows the programmer to specify diagnostic
- * printout. Useful to replace if + panic, or if + print + assert, etc.
- *
- * @param cond Condition that is checked; if true -> panic
- * @param ... Printf-based format string with arguments, extends printout.
- */
-#define panic_if(cond, ...) \
- do { \
- if ((cond)) { \
- panic("panic condition " # cond " occurred: %s", \
- csprintf(__VA_ARGS__)); \
- } \
- } while (0)
-
-
-/**
- * Conditional fatal macro that checks the supplied condition and only causes a
- * fatal error if the condition is true and allows the programmer to specify
- * diagnostic printout. Useful to replace if + fatal, or if + print + assert,
- * etc.
- *
- * @param cond Condition that is checked; if true -> fatal
- * @param ... Printf-based format string with arguments, extends printout.
- */
-#define fatal_if(cond, ...) \
- do { \
- if ((cond)) { \
- fatal("fatal condition " # cond " occurred: %s", \
- csprintf(__VA_ARGS__)); \
- } \
- } while (0)
-
-
-#define base_message(logger, ...) \
- logger.print(__FUNCTION__, __FILE__, __LINE__, __VA_ARGS__)
-
-// Only print the message the first time this expression is
-// encountered. i.e. This doesn't check the string itself and
-// prevent duplicate strings, this prevents the statement from
-// happening more than once. So, even if the arguments change and that
-// would have resulted in a different message thoes messages would be
-// supressed.
-#define base_message_once(...) do { \
- static bool once = false; \
- if (!once) { \
- base_message(__VA_ARGS__); \
- once = true; \
- } \
- } while (0)
-
-
-#define warn(...) \
- base_message(::Logger::get(::Logger::WARN), __VA_ARGS__)
-#define inform(...) \
- base_message(::Logger::get(::Logger::INFO), __VA_ARGS__)
-#define hack(...) \
- base_message(::Logger::get(::Logger::HACK), __VA_ARGS__)
-
-#define warn_once(...) \
- base_message_once(::Logger::get(::Logger::WARN), __VA_ARGS__)
-#define inform_once(...) \
- base_message_once(::Logger::get(::Logger::INFO), __VA_ARGS__)
-#define hack_once(...) \
- base_message_once(::Logger::get(::Logger::HACK), __VA_ARGS__)
-
-/**
- * Conditional warning macro that checks the supplied condition and
- * only prints a warning if the condition is true. Useful to replace
- * if + warn.
- *
- * @param cond Condition that is checked; if true -> warn
- * @param ... Printf-based format string with arguments, extends printout.
- */
-#define warn_if(cond, ...) \
- do { \
- if ((cond)) \
- warn(__VA_ARGS__); \
- } while (0)
-
-/**
- * The chatty assert macro will function like a normal assert, but will allow the
- * specification of additional, helpful material to aid debugging why the
- * assertion actually failed. Like the normal assertion, the chatty_assert
- * will not be active in fast builds.
- *
- * @param cond Condition that is checked; if false -> assert
- * @param ... Printf-based format string with arguments, extends printout.
- */
-#ifdef NDEBUG
-#define chatty_assert(cond, ...)
-#else //!NDEBUG
-#define chatty_assert(cond, ...) \
- do { \
- if (!(cond)) \
- panic("assert(" # cond ") failed: %s", csprintf(__VA_ARGS__)); \
- } while (0)
-#endif // NDEBUG
-#endif // __BASE_MISC_HH__
#include <cstdlib>
#include <fstream>
-#include "base/misc.hh"
+#include "base/logging.hh"
using namespace std;
#include <cstdio>
#include <cstdlib>
-#include "base/misc.hh"
+#include "base/logging.hh"
const char* PngWriter::_imgExtension = "png";
#include <csignal>
#include <cstring>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "sim/async.hh"
#include "sim/core.hh"
#include <sstream>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "sim/serialize.hh"
Random::Random()
#include <cerrno>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "sim/byteswap.hh"
#include "base/cprintf.hh"
#include "base/debug.hh"
#include "base/hostinfo.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/str.hh"
#include "base/time.hh"
#include "base/trace.hh"
#include <string>
#include "base/cast.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/stats/info.hh"
#include "base/str.hh"
#include <iostream>
#include <sstream>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "config/use_posix_clock.hh"
#include "sim/core.hh"
#include "sim/serialize.hh"
#include <string>
#include "base/debug.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/output.hh"
#include "base/str.hh"
#include <cassert>
#include "base/cprintf.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
// Key has to be an integral type.
#include <sys/types.h>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/output.hh"
#include "base/trace.hh"
#include <cstdio>
#include "base/atomicio.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/output.hh"
#include "base/socket.hh"
#include "base/trace.hh"
#include "arch/tlb.hh"
#include "base/cprintf.hh"
#include "base/loader/symtab.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/output.hh"
#include "base/trace.hh"
#include "cpu/checker/cpu.hh"
#include <sstream>
-#include "base/misc.hh"
+#include "base/logging.hh"
using namespace std;
#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "params/IntrControl.hh"
#include "sim/sim_object.hh"
#include "sim/system.hh"
#include <cassert>
#include <cerrno>
-#include "base/misc.hh"
+#include "base/logging.hh"
KvmDevice::KvmDevice(int _fd)
: fd(_fd)
#include <csignal>
#include <cstring>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "perfevent.hh"
PerfKvmCounterConfig::PerfKvmCounterConfig(uint32_t type, uint64_t config)
#include <csignal>
#include <ctime>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/KvmTimer.hh"
#include <queue>
#include <sstream>
-#include "base/misc.hh"
-#include "cpu/minor/trace.hh"
+#include "base/logging.hh"
#include "cpu/activity.hh"
+#include "cpu/minor/trace.hh"
#include "cpu/timebuf.hh"
namespace Minor
#include <queue>
#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "cpu/o3/comm.hh"
#include "cpu/o3/regfile.hh"
#include "cpu/o3/store_set.hh"
#include "base/intmath.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/StoreSet.hh"
#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
class ThreadContext;
#include "cpu/pred/2bit_local.hh"
#include "base/intmath.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/Fetch.hh"
#define __CPU_PRED_BTB_HH__
#include "arch/types.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "config/the_isa.hh"
#include "cpu/pred/ltage.hh"
#include "base/intmath.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/random.hh"
#include "base/trace.hh"
#include "debug/Fetch.hh"
#ifndef __CPU_PRED_SAT_COUNTER_HH__
#define __CPU_PRED_SAT_COUNTER_HH__
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
/**
#include "base/cprintf.hh"
#include "base/inifile.hh"
#include "base/loader/symtab.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/pollevent.hh"
#include "base/trace.hh"
#include "base/types.hh"
#include "arch/registers.hh"
#include "arch/types.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/refcnt.hh"
#include "base/types.hh"
#include "config/the_isa.hh"
#include <string>
#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/random.hh"
#include "base/statistics.hh"
#include "debug/GarnetSyntheticTraffic.hh"
#include "cpu/testers/rubytest/RubyTester.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "cpu/testers/rubytest/Check.hh"
#include "debug/RubyTest.hh"
#include "cpu/thread_context.hh"
#include "arch/kernel_stats.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
#include "cpu/base.hh"
#include "dev/intel_8254_timer.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "debug/Intel8254Timer.hh"
using namespace std;
#define __DEV_MC146818_HH__
#include "base/bitunion.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "sim/eventq_impl.hh"
/** Real-Time Clock (MC146818) */
#include <thread>
#include <utility>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "dev/net/dist_packet.hh"
#include "dev/net/etherpkt.hh"
#include "sim/core.hh"
#include <string>
#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/Ethernet.hh"
#include "debug/EthernetData.hh"
#include <algorithm>
#include <string>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/output.hh"
#include "sim/core.hh"
#include "dev/net/etherint.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "sim/sim_object.hh"
void
#include <iostream>
#include "base/inet.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "sim/serialize.hh"
using namespace std;
#include <deque>
#include <string>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/pollevent.hh"
#include "base/socket.hh"
#include "base/trace.hh"
#include "dev/net/pktfifo.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
using namespace std;
#include <list>
#include <string>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "dev/net/etherpkt.hh"
#include "sim/serialize.hh"
#include "base/inifile.hh"
#include "base/intmath.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/str.hh"
#include "base/trace.hh"
#include "debug/PciDevice.hh"
#include "dev/platform.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "config/the_isa.hh"
#include "sim/sim_exit.hh"
#include <list>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "x11keysym/keysym.h"
namespace Ps2 {
#include "dev/serial/serial.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "params/SerialDevice.hh"
#include "params/SerialNullDevice.hh"
#include <string>
#include "base/atomicio.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/output.hh"
#include "base/socket.hh"
#include "base/trace.hh"
#include <string>
#include "base/callback.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/DiskImageRead.hh"
#include "debug/DiskImageWrite.hh"
#include <cstring>
#include <string>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/SimpleDisk.hh"
#include "debug/SimpleDiskData.hh"
#include <cstdlib>
#include "arch/hsail/Brig.h"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/BRIG.hh"
#include "debug/HSAILObject.hh"
#include "arch/x86/pagetable_walker.hh"
#include "arch/x86/regs/segment.hh"
#include "base/callback.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/statistics.hh"
#include "gpu-compute/compute_unit.hh"
#include "mem/mem_object.hh"
#include <cassert>
#include <fstream>
-#include "base/misc.hh"
+#include "base/logging.hh"
HsaObject::HsaObject(const std::string &fname)
: readonlyData(nullptr), filename(fname)
#include <limits>
#include <memory>
-#include "base/misc.hh"
+#include "base/logging.hh"
class GPUDynInst;
#include <cstddef>
#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
class Wavefront;
#include <utility>
#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
class Wavefront;
#include "gpu-compute/simple_pool_manager.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
// return the min number of elements that the manager can reserve given
// a request for "size" elements
#include "arch/isa_traits.hh"
#include "arch/x86/pagetable.hh"
#include "arch/x86/regs/segment.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/statistics.hh"
#include "gpu-compute/gpu_tlb.hh"
#include "mem/mem_object.hh"
#include <string>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "gpu-compute/compute_unit.hh"
#include "gpu-compute/gpu_dyn_inst.hh"
#include "gpu-compute/shader.hh"
#include <vector>
#include "arch/gpu_isa.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "config/the_gpu_isa.hh"
#include "gpu-compute/condition_register_state.hh"
#include "kern/operatingsystem.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
int
OperatingSystem::openSpecialFile(std::string path, Process *process,
#include <string>
#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/statistics.hh"
#include "base/trace.hh"
#include "base/types.hh"
#include "mem/cache/cache.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "debug/Cache.hh"
#include "debug/CachePort.hh"
#include <unordered_set>
-#include "base/misc.hh" // fatal, panic, and warn
+#include "base/logging.hh" // fatal, panic, and warn
#include "enums/Clusivity.hh"
#include "mem/cache/base.hh"
#include "mem/cache/blk.hh"
#include <string>
#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "debug/Cache.hh"
#include "mem/cache/cache.hh"
#include <sstream>
#include "base/intmath.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
using namespace std;
#include <string>
#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "debug/Cache.hh"
#include "mem/cache/cache.hh"
#include "mem/coherent_xbar.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/AddrRanges.hh"
#include "debug/CoherentXBar.hh"
#include "DRAMSim2/MultiChannelMemorySystem.h"
#include "base/compiler.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
/**
* DRAMSim2 requires SHOW_SIM_OUTPUT to be defined (declared extern in
#include <unordered_map>
#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "base/types.hh"
#include "debug/MemChecker.hh"
#include "mem/noncoherent_xbar.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/NoncoherentXBar.hh"
#include "debug/XBar.hh"
#include <iostream>
#include "base/cprintf.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
using namespace std;
#include "base/cast.hh"
#include "base/compiler.hh"
#include "base/flags.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/printable.hh"
#include "base/types.hh"
#include "mem/request.hh"
#include <climits>
#include "base/flags.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "cpu/inst_seq.hh"
#include "sim/core.hh"
#include <cassert>
#include <iostream>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "mem/ruby/common/TypeDefines.hh"
// Change for systems with more than 64 controllers of a particular type.
#include <cassert>
#include "base/cprintf.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/random.hh"
#include "base/stl_helpers.hh"
#include "debug/RubyQueue.hh"
#include "mem/ruby/network/Network.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "mem/ruby/common/MachineID.hh"
#include "mem/ruby/network/BasicLink.hh"
#include "mem/ruby/system/RubySystem.hh"
// GEM5 includes
#include "FaultModel.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
using namespace std;
#include <iostream>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "mem/protocol/AccessPermission.hh"
#include "mem/ruby/common/Address.hh"
#include "mem/ruby/slicc_interface/AbstractEntry.hh"
#include "mem/ruby/structures/AbstractReplacementPolicy.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
AbstractReplacementPolicy::AbstractReplacementPolicy(const Params * p)
: SimObject(p)
* Author: Sooraj Puthoor
*/
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/str.hh"
#include "config/the_isa.hh"
#include "mem/ruby/system/Sequencer.hh"
#include "arch/x86/ldstflags.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/str.hh"
#include "cpu/testers/rubytest/RubyTester.hh"
#include "debug/MemoryAccess.hh"
* Author: Sooraj Puthoor
*/
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/str.hh"
#include "config/the_isa.hh"
#include <cassert>
#include <typeinfo>
-#include "base/misc.hh"
+#include "base/logging.hh"
''')
for f in self.debug_flags:
#include <cassert>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/ProtocolTrace.hh"
#include "debug/RubyGenerated.hh"
if self.isMachineType:
code('#include <functional>')
- code('#include "base/misc.hh"')
+ code('#include "base/logging.hh"')
code('#include "mem/ruby/common/Address.hh"')
code('#include "mem/ruby/common/TypeDefines.hh"')
code('struct MachineID;')
#include <iostream>
#include <string>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "mem/protocol/${{self.c_ident}}.hh"
using namespace std;
#include "mem/snoop_filter.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/SnoopFilter.hh"
#include "sim/system.hh"
#include "mem/xbar.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/AddrRanges.hh"
#include "debug/Drain.hh"
#include "proto/protoio.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
using namespace std;
using namespace google::protobuf;
#include "base/addr_range.hh"
#include "base/inet.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/random.hh"
#include "base/socket.hh"
#include "base/types.hh"
#include "pybind11/pybind11.h"
#include "pybind11/stl.h"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "sim/eventq.hh"
#include "sim/sim_events.hh"
#include "sim/sim_exit.hh"
#include "sim/clocked_object.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "sim/power/power_model.hh"
ClockedObject::ClockedObject(const ClockedObjectParams *p) :
#include <algorithm>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/Drain.hh"
#include "sim/sim_exit.hh"
#include <set>
#include <utility>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "debug/DVFS.hh"
#include "params/DVFSHandler.hh"
#include <unordered_map>
#include <vector>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "cpu/smt.hh"
#include "debug/Checkpoint.hh"
#include "sim/faults.hh"
#include "arch/isa_traits.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/base.hh"
#include "cpu/thread_context.hh"
#include "debug/Fault.hh"
#include <memory>
#include <string>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "params/Process.hh"
#include "sim/fd_entry.hh"
#include <string>
#include "base/cprintf.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/types.hh"
#include "config/have_protobuf.hh"
#include "python/pybind11/pybind.hh"
#include "base/atomicio.hh"
#include "base/cprintf.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "sim/async.hh"
#include "sim/backtrace.hh"
#include "sim/core.hh"
#include <regex>
#include <string>
-#include "base/misc.hh"
+#include "base/logging.hh"
MathExpr::MathExpr(std::string expr)
: ops(
#include "sim/microcode_rom.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "cpu/static_inst_fwd.hh"
StaticInstPtr
* Gabe Black
*/
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "config/the_isa.hh"
#include "debug/TimeSync.hh"
#include "arch/generic/vec_reg.hh"
#include "base/framebuffer.hh"
#include "base/inifile.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/output.hh"
#include "base/str.hh"
#include "base/trace.hh"
#include "sim/sim_object.hh"
+#include "base/logging.hh"
#include "base/match.hh"
-#include "base/misc.hh"
#include "base/trace.hh"
#include "debug/Checkpoint.hh"
#include "sim/probe/probe.hh"
#include <mutex>
#include <thread>
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/pollevent.hh"
#include "base/types.hh"
#include "sim/async.hh"
#include "arch/utility.hh"
#include "base/intmath.hh"
#include "base/loader/object_file.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/trace.hh"
#include "base/types.hh"
#include "config/the_isa.hh"
#include <string>
#include "base/cprintf.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
using namespace std;
#include "base/loader/object_file.hh"
#include "base/loader/symtab.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/str.hh"
using namespace std;
#include <string>
#include "base/cprintf.hh"
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/statistics.hh"
#include "base/types.hh"
#include "sim/core.hh"
* most one Gem5Module instantiated in any simulation.
*/
-#include "base/misc.hh"
+#include "base/logging.hh"
#include "base/pollevent.hh"
#include "base/trace.hh"
#include "debug/Event.hh"