Compare commits
3 Commits
fda8741aa3
...
23551d2955
Author | SHA1 | Date |
---|---|---|
Félix Baylac Jacqué | 23551d2955 | |
Félix Baylac Jacqué | c12f1ad511 | |
Félix Baylac Jacqué | 51fda99905 |
|
@ -351,11 +351,9 @@ fi
|
|||
AC_ARG_ENABLE(tracy-profiler, AS_HELP_STRING([--enable-tracy-profiler],[Profile the Nix evaluation using the Tracy profiler (default no)]),
|
||||
TRACY_PROFILER=$enableval, TRACY_PROFILER=no)
|
||||
if test "$TRACY_PROFILER" != no; then
|
||||
# We don't have any pkg-config file for tracy, we have to inject the
|
||||
# headers manually…
|
||||
CXXFLAGS="-I $TRACY_PROFILER/include/Tracy $CXXFLAGS"
|
||||
echo "TRACY ENABLED: $TRACY_PROFILER"
|
||||
else
|
||||
echo "TRACY DISABLED"
|
||||
exit 1
|
||||
fi
|
||||
AC_SUBST(TRACY_PROFILER)
|
||||
|
||||
|
|
|
@ -57,12 +57,12 @@
|
|||
|
||||
#define TRACY_TRACE(evalstate, expr) \
|
||||
std::ostringstream tracyss; \
|
||||
tracyss << evalstate.positions[(expr)->getPos()] << " " << (expr)->showExprType(); \
|
||||
tracyss << (evalstate).positions[(expr)->getPos()] << " " << (expr)->showExprType(); \
|
||||
ZoneTransientN(nix, tracyss.str().c_str(), true);
|
||||
|
||||
#define TRACY_TRACE_TYPE_STR(evalstate, expr, typestr) \
|
||||
std::ostringstream tracyss; \
|
||||
tracyss << (evalstate).positions[(expr)->getPos()] << " " << typestr; \
|
||||
tracyss << (evalstate).positions[(expr)->getPos()] << " " << typestr; \
|
||||
ZoneTransientN(nix, tracyss.str().c_str(), true);
|
||||
|
||||
using json = nlohmann::json;
|
||||
|
@ -81,7 +81,6 @@ static char * allocString(size_t size)
|
|||
return t;
|
||||
}
|
||||
|
||||
|
||||
static char * dupString(const char * s)
|
||||
{
|
||||
char * t;
|
||||
|
|
|
@ -22,6 +22,8 @@ ifdef HOST_LINUX
|
|||
endif
|
||||
ifneq ($(TRACY_PROFILER), no)
|
||||
libexpr_LDFLAGS += -ltracy
|
||||
# We have to set TRACY_ENABLE to have tracy actually send the trace
|
||||
# events, it's no-op without them.
|
||||
libexpr_CXXFLAGS += -DTRACY_ENABLE=1
|
||||
endif
|
||||
|
||||
|
|
|
@ -98,9 +98,6 @@ void Pos::print(std::ostream & out, bool showOrigin) const
|
|||
}, origin);
|
||||
out << ":";
|
||||
}
|
||||
out << line;
|
||||
if (column > 0)
|
||||
out << ":" << column;
|
||||
}
|
||||
|
||||
std::ostream & operator<<(std::ostream & str, const Pos & pos)
|
||||
|
|
Loading…
Reference in New Issue