1/* 2 * Copyright (c) 2014 ARM Limited 3 * All rights reserved 4 * 5 * Copyright (c) 2001-2006 The Regents of The University of Michigan 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 25 unchanged lines hidden (view full) --- 34 */ 35 36#include <cctype> 37#include <fstream> 38#include <iostream> 39#include <sstream> 40#include <string> 41 |
42#include "base/debug.hh" |
43#include "base/misc.hh" 44#include "base/output.hh" 45#include "base/str.hh" 46#include "base/trace.hh" 47 48const std::string &name() 49{ 50 static const std::string default_name("global"); 51 52 return default_name; 53} 54 55namespace Trace 56{ 57 |
58// This variable holds the output logger for debug information. Other 59// than setting up/redirecting this logger, do *NOT* reference this 60// directly 61 62Logger *debug_logger = NULL; 63 64Logger * 65getDebugLogger() --- 15 unchanged lines hidden (view full) --- 81setDebugLogger(Logger *logger) 82{ 83 if (!logger) 84 warn("Trying to set debug logger to NULL\n"); 85 else 86 debug_logger = logger; 87} 88 |
89void 90enable() 91{ 92 Debug::SimpleFlag::enableAll(); 93} 94 95void 96disable() 97{ 98 Debug::SimpleFlag::disableAll(); 99} 100 |
101ObjectMatch ignore; 102 103void 104Logger::dump(Tick when, const std::string &name, const void *d, int len) 105{ 106 if (!name.empty() && ignore.match(name)) 107 return; 108 --- 51 unchanged lines hidden --- |