summaryrefslogtreecommitdiff
path: root/src/lj_trace.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_trace.c')
-rw-r--r--src/lj_trace.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/lj_trace.c b/src/lj_trace.c
index bef4558b..6b1dd2f6 100644
--- a/src/lj_trace.c
+++ b/src/lj_trace.c
@@ -12,6 +12,7 @@
12 12
13#include "lj_gc.h" 13#include "lj_gc.h"
14#include "lj_err.h" 14#include "lj_err.h"
15#include "lj_debug.h"
15#include "lj_str.h" 16#include "lj_str.h"
16#include "lj_frame.h" 17#include "lj_frame.h"
17#include "lj_state.h" 18#include "lj_state.h"
@@ -103,10 +104,8 @@ static void perftools_addtrace(GCtrace *T)
103 name++; 104 name++;
104 else 105 else
105 name = "(string)"; 106 name = "(string)";
106 if (startpc >= proto_bc(pt) && startpc < proto_bc(pt) + pt->sizebc) 107 lua_assert(startpc >= proto_bc(pt) && startpc < proto_bc(pt) + pt->sizebc);
107 lineno = proto_line(pt, proto_bcpos(pt, startpc)); 108 lineno = lj_debug_line(pt, proto_bcpos(pt, startpc));
108 else
109 lineno = proto_line(pt, 0); /* Wrong, but better than nothing. */
110 if (!fp) { 109 if (!fp) {
111 char fname[40]; 110 char fname[40];
112 sprintf(fname, "/tmp/perf-%d.map", getpid()); 111 sprintf(fname, "/tmp/perf-%d.map", getpid());