Use traceRelease for Eval.DumpBytecode
This shouldn't be restricted to debug builds.
Esse commit está contido em:
@@ -2710,7 +2710,7 @@ Unit* UnitEmitter::create() {
|
||||
|
||||
if (RuntimeOption::EvalDumpBytecode) {
|
||||
// Dump human-readable bytecode.
|
||||
Trace::trace(u->toString());
|
||||
Trace::traceRelease(u->toString());
|
||||
}
|
||||
|
||||
static const bool kAlwaysVerify = getenv("HHVM_ALWAYS_VERIFY");
|
||||
|
||||
+11
-5
@@ -13,11 +13,6 @@
|
||||
| license@php.net so we can mail you a copy immediately. |
|
||||
+----------------------------------------------------------------------+
|
||||
*/
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string>
|
||||
|
||||
/*
|
||||
* Forcibly define USE_TRACE, so we get the debug trace.h interface included
|
||||
@@ -28,6 +23,13 @@
|
||||
# define USE_TRACE 1
|
||||
#endif
|
||||
#include "util/trace.h"
|
||||
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include <string>
|
||||
|
||||
#include "util/ringbuffer.h"
|
||||
|
||||
namespace HPHP {
|
||||
@@ -141,6 +143,10 @@ void trace(const std::string& s) {
|
||||
trace("%s", s.c_str());
|
||||
}
|
||||
|
||||
void traceRelease(const std::string& s) {
|
||||
traceRelease("%s", s.c_str());
|
||||
}
|
||||
|
||||
template<>
|
||||
std::string prettyNode(const char* name, const std::string& s) {
|
||||
using std::string;
|
||||
|
||||
+7
-6
@@ -164,9 +164,10 @@ std::string prettyNode(const char* name, const P1& p1, const P2& p2) {
|
||||
string(")");
|
||||
}
|
||||
|
||||
extern void traceRelease(const char*, ...);
|
||||
void traceRelease(const char*, ...);
|
||||
void traceRelease(const std::string& s);
|
||||
extern int levels[NumModules];
|
||||
extern const char* moduleName(Module mod);
|
||||
const char* moduleName(Module mod);
|
||||
static inline bool moduleEnabledRelease(Module tm, int level = 1) {
|
||||
return levels[tm] >= level;
|
||||
}
|
||||
@@ -204,15 +205,15 @@ static const bool enabled = true;
|
||||
#define TRACE_SET_MOD(name) \
|
||||
static const HPHP::Trace::Module TRACEMOD = HPHP::Trace::name;
|
||||
|
||||
extern void trace(const char *, ...)
|
||||
void trace(const char *, ...)
|
||||
__attribute__((format(printf,1,2)));
|
||||
extern void trace(const std::string&);
|
||||
void trace(const std::string&);
|
||||
|
||||
template<typename Pretty>
|
||||
static inline void trace(Pretty p) { trace(p.pretty() + std::string("\n")); }
|
||||
|
||||
extern void vtrace(const char *fmt, va_list args);
|
||||
extern void dumpRingbuffer();
|
||||
void vtrace(const char *fmt, va_list args);
|
||||
void dumpRingbuffer();
|
||||
#else /* } (defined(DEBUG) || defined(USE_TRACE)) { */
|
||||
/*
|
||||
* Compile everything out of release builds. gcc is smart enough to
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário