trace.cc (10475:5744891a444b) trace.cc (11153:20bbfe5b2b86)
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
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"
42#include "base/misc.hh"
43#include "base/output.hh"
44#include "base/str.hh"
45#include "base/trace.hh"
46
47const std::string &name()
48{
49 static const std::string default_name("global");
50
51 return default_name;
52}
53
54namespace Trace
55{
56
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
57bool enabled = false;
58
59// This variable holds the output logger for debug information. Other
60// than setting up/redirecting this logger, do *NOT* reference this
61// directly
62
63Logger *debug_logger = NULL;
64
65Logger *
66getDebugLogger()

--- 15 unchanged lines hidden (view full) ---

82setDebugLogger(Logger *logger)
83{
84 if (!logger)
85 warn("Trying to set debug logger to NULL\n");
86 else
87 debug_logger = logger;
88}
89
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
90ObjectMatch ignore;
91
92void
93Logger::dump(Tick when, const std::string &name, const void *d, int len)
94{
95 if (!name.empty() && ignore.match(name))
96 return;
97

--- 51 unchanged lines hidden ---
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 ---