trace.hh (10259:ebb376f73dd2) trace.hh (10292:933dfb9d8279)
1/*
1/*
2 * Copyright (c) 2014 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software
9 * licensed hereunder. You may use the software subject to the license
10 * terms below provided that you ensure that this notice is replicated
11 * unmodified and in its entirety in all distributions of the software,
12 * modified or unmodified, in source code or in binary form.
13 *
2 * Copyright (c) 2001-2006 The Regents of The University of Michigan
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met: redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer;
9 * redistributions in binary form must reproduce the above copyright

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

50
51extern bool enabled;
52bool changeFlag(const char *str, bool value);
53void dumpStatus();
54
55extern ObjectMatch ignore;
56extern const std::string DefaultName;
57
14 * Copyright (c) 2001-2006 The Regents of The University of Michigan
15 * All rights reserved.
16 *
17 * Redistribution and use in source and binary forms, with or without
18 * modification, are permitted provided that the following conditions are
19 * met: redistributions of source code must retain the above copyright
20 * notice, this list of conditions and the following disclaimer;
21 * redistributions in binary form must reproduce the above copyright

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

62
63extern bool enabled;
64bool changeFlag(const char *str, bool value);
65void dumpStatus();
66
67extern ObjectMatch ignore;
68extern const std::string DefaultName;
69
58void dprintf(Tick when, const std::string &name, const char *format,
59 CPRINTF_DECLARATION);
70bool __dprintf_prologue(Tick when, const std::string &name);
71
72template<typename ...Args> void
73dprintf(Tick when, const std::string &name, const char *format,
74 const Args &...args)
75{
76 if (!__dprintf_prologue(when, name))
77 return;
78
79 std::ostream &os(output());
80 ccprintf(os, format, args...);
81 os.flush();
82}
83
60void dump(Tick when, const std::string &name, const void *data, int len);
61
62} // namespace Trace
63
64// This silly little class allows us to wrap a string in a functor
65// object so that we can give a name() that DPRINTF will like
66struct StringWrap
67{

--- 85 unchanged lines hidden ---
84void dump(Tick when, const std::string &name, const void *data, int len);
85
86} // namespace Trace
87
88// This silly little class allows us to wrap a string in a functor
89// object so that we can give a name() that DPRINTF will like
90struct StringWrap
91{

--- 85 unchanged lines hidden ---