aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/running.html6
-rw-r--r--src/lj_jit.h6
-rw-r--r--src/lj_record.c4
3 files changed, 9 insertions, 7 deletions
diff --git a/doc/running.html b/doc/running.html
index cf221a4d..76a393ba 100644
--- a/doc/running.html
+++ b/doc/running.html
@@ -213,13 +213,13 @@ Here are the parameters and their default settings:
213<tr class="odd separate"> 213<tr class="odd separate">
214<td class="param_name">maxtrace</td><td class="param_default">1000</td><td class="param_desc">Max. number of traces in the cache</td></tr> 214<td class="param_name">maxtrace</td><td class="param_default">1000</td><td class="param_desc">Max. number of traces in the cache</td></tr>
215<tr class="even"> 215<tr class="even">
216<td class="param_name">maxrecord</td><td class="param_default">2000</td><td class="param_desc">Max. number of recorded IR instructions</td></tr> 216<td class="param_name">maxrecord</td><td class="param_default">4000</td><td class="param_desc">Max. number of recorded IR instructions</td></tr>
217<tr class="odd"> 217<tr class="odd">
218<td class="param_name">maxirconst</td><td class="param_default">500</td><td class="param_desc">Max. number of IR constants of a trace</td></tr> 218<td class="param_name">maxirconst</td><td class="param_default">500</td><td class="param_desc">Max. number of IR constants of a trace</td></tr>
219<tr class="even"> 219<tr class="even">
220<td class="param_name">maxside</td><td class="param_default">100</td><td class="param_desc">Max. number of side traces of a root trace</td></tr> 220<td class="param_name">maxside</td><td class="param_default">100</td><td class="param_desc">Max. number of side traces of a root trace</td></tr>
221<tr class="odd"> 221<tr class="odd">
222<td class="param_name">maxsnap</td><td class="param_default">100</td><td class="param_desc">Max. number of snapshots for a trace</td></tr> 222<td class="param_name">maxsnap</td><td class="param_default">500</td><td class="param_desc">Max. number of snapshots for a trace</td></tr>
223<tr class="even separate"> 223<tr class="even separate">
224<td class="param_name">hotloop</td><td class="param_default">56</td><td class="param_desc">Number of iterations to detect a hot loop or hot call</td></tr> 224<td class="param_name">hotloop</td><td class="param_default">56</td><td class="param_desc">Number of iterations to detect a hot loop or hot call</td></tr>
225<tr class="odd"> 225<tr class="odd">
@@ -229,7 +229,7 @@ Here are the parameters and their default settings:
229<tr class="odd separate"> 229<tr class="odd separate">
230<td class="param_name">instunroll</td><td class="param_default">4</td><td class="param_desc">Max. unroll factor for instable loops</td></tr> 230<td class="param_name">instunroll</td><td class="param_default">4</td><td class="param_desc">Max. unroll factor for instable loops</td></tr>
231<tr class="even"> 231<tr class="even">
232<td class="param_name">loopunroll</td><td class="param_default">7</td><td class="param_desc">Max. unroll factor for loop ops in side traces</td></tr> 232<td class="param_name">loopunroll</td><td class="param_default">15</td><td class="param_desc">Max. unroll factor for loop ops in side traces</td></tr>
233<tr class="odd"> 233<tr class="odd">
234<td class="param_name">callunroll</td><td class="param_default">3</td><td class="param_desc">Max. unroll factor for pseudo-recursive calls</td></tr> 234<td class="param_name">callunroll</td><td class="param_default">3</td><td class="param_desc">Max. unroll factor for pseudo-recursive calls</td></tr>
235<tr class="even"> 235<tr class="even">
diff --git a/src/lj_jit.h b/src/lj_jit.h
index 92631440..cced4813 100644
--- a/src/lj_jit.h
+++ b/src/lj_jit.h
@@ -67,17 +67,17 @@
67/* Optimization parameters and their defaults. Length is a char in octal! */ 67/* Optimization parameters and their defaults. Length is a char in octal! */
68#define JIT_PARAMDEF(_) \ 68#define JIT_PARAMDEF(_) \
69 _(\010, maxtrace, 1000) /* Max. # of traces in cache. */ \ 69 _(\010, maxtrace, 1000) /* Max. # of traces in cache. */ \
70 _(\011, maxrecord, 2000) /* Max. # of recorded IR instructions. */ \ 70 _(\011, maxrecord, 4000) /* Max. # of recorded IR instructions. */ \
71 _(\012, maxirconst, 500) /* Max. # of IR constants of a trace. */ \ 71 _(\012, maxirconst, 500) /* Max. # of IR constants of a trace. */ \
72 _(\007, maxside, 100) /* Max. # of side traces of a root trace. */ \ 72 _(\007, maxside, 100) /* Max. # of side traces of a root trace. */ \
73 _(\007, maxsnap, 100) /* Max. # of snapshots for a trace. */ \ 73 _(\007, maxsnap, 500) /* Max. # of snapshots for a trace. */ \
74 \ 74 \
75 _(\007, hotloop, 56) /* # of iter. to detect a hot loop/call. */ \ 75 _(\007, hotloop, 56) /* # of iter. to detect a hot loop/call. */ \
76 _(\007, hotexit, 10) /* # of taken exits to start a side trace. */ \ 76 _(\007, hotexit, 10) /* # of taken exits to start a side trace. */ \
77 _(\007, tryside, 4) /* # of attempts to compile a side trace. */ \ 77 _(\007, tryside, 4) /* # of attempts to compile a side trace. */ \
78 \ 78 \
79 _(\012, instunroll, 4) /* Max. unroll for instable loops. */ \ 79 _(\012, instunroll, 4) /* Max. unroll for instable loops. */ \
80 _(\012, loopunroll, 7) /* Max. unroll for loop ops in side traces. */ \ 80 _(\012, loopunroll, 15) /* Max. unroll for loop ops in side traces. */ \
81 _(\012, callunroll, 3) /* Max. unroll for recursive calls. */ \ 81 _(\012, callunroll, 3) /* Max. unroll for recursive calls. */ \
82 _(\011, recunroll, 2) /* Min. unroll for true recursion. */ \ 82 _(\011, recunroll, 2) /* Min. unroll for true recursion. */ \
83 \ 83 \
diff --git a/src/lj_record.c b/src/lj_record.c
index 36425086..41b2221a 100644
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -521,7 +521,9 @@ static void rec_loop_interp(jit_State *J, const BCIns *pc, LoopEvent ev)
521 */ 521 */
522 if (!innerloopleft(J, pc)) 522 if (!innerloopleft(J, pc))
523 lj_trace_err(J, LJ_TRERR_LINNER); /* Root trace hit an inner loop. */ 523 lj_trace_err(J, LJ_TRERR_LINNER); /* Root trace hit an inner loop. */
524 if ((J->loopref && J->cur.nins - J->loopref > 8) || --J->loopunroll < 0) 524 if ((J->loopref && J->cur.nins - J->loopref >
525 ((IRRef)J->param[JIT_P_maxrecord] >> 5)) ||
526 --J->loopunroll < 0)
525 lj_trace_err(J, LJ_TRERR_LUNROLL); /* Limit loop unrolling. */ 527 lj_trace_err(J, LJ_TRERR_LUNROLL); /* Limit loop unrolling. */
526 J->loopref = J->cur.nins; 528 J->loopref = J->cur.nins;
527 } 529 }