Compare commits

..

3 Commits

Author SHA1 Message Date
Félix Baylac Jacqué 23551d2955 BUG: line and columns in file location are segfaulting tracy
I don't really get that one. As soon as we send those to tracy, we
segfault the profiler. I really don't get what's happening here.

We need to investigate this more to figure out what's happening.
2024-02-07 19:54:02 +01:00
Félix Baylac Jacqué c12f1ad511 Autotools hell 2024-02-07 19:52:51 +01:00
Félix Baylac Jacqué 51fda99905 Tracing: trace primops 2024-02-07 19:52:35 +01:00
4 changed files with 6 additions and 10 deletions

View File

@ -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)

View File

@ -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;

View File

@ -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

View File

@ -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)