diff options
author | Mike Pall <mike> | 2013-09-08 02:53:23 +0200 |
---|---|---|
committer | Mike Pall <mike> | 2013-09-08 02:53:23 +0200 |
commit | d1194a82eb24afa1c749a0a8080b67d168f9f201 (patch) | |
tree | fb3bebc2cbf5032a49653dd6a0bd31c420dd8083 /src/lj_opt_fold.c | |
parent | d3d30d389b504495d054d71bdee0fe2677d4b44c (diff) | |
download | luajit-d1194a82eb24afa1c749a0a8080b67d168f9f201.tar.gz luajit-d1194a82eb24afa1c749a0a8080b67d168f9f201.tar.bz2 luajit-d1194a82eb24afa1c749a0a8080b67d168f9f201.zip |
Low-overhead profiler, part 4: JIT compiler support.
Diffstat (limited to 'src/lj_opt_fold.c')
-rw-r--r-- | src/lj_opt_fold.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c index 1d37a7fd..84c5dc00 100644 --- a/src/lj_opt_fold.c +++ b/src/lj_opt_fold.c | |||
@@ -2285,6 +2285,17 @@ LJFOLDF(barrier_tnew_tdup) | |||
2285 | return DROPFOLD; | 2285 | return DROPFOLD; |
2286 | } | 2286 | } |
2287 | 2287 | ||
2288 | /* -- Profiling ----------------------------------------------------------- */ | ||
2289 | |||
2290 | LJFOLD(PROF any any) | ||
2291 | LJFOLDF(prof) | ||
2292 | { | ||
2293 | IRRef ref = J->chain[IR_PROF]; | ||
2294 | if (ref+1 == J->cur.nins) /* Drop neighbouring IR_PROF. */ | ||
2295 | return ref; | ||
2296 | return EMITFOLD; | ||
2297 | } | ||
2298 | |||
2288 | /* -- Stores and allocations ---------------------------------------------- */ | 2299 | /* -- Stores and allocations ---------------------------------------------- */ |
2289 | 2300 | ||
2290 | /* Stores and allocations cannot be folded or passed on to CSE in general. | 2301 | /* Stores and allocations cannot be folded or passed on to CSE in general. |