diff options
| author | Mike Pall <mike> | 2024-11-14 17:13:58 +0100 |
|---|---|---|
| committer | Mike Pall <mike> | 2024-11-14 17:13:58 +0100 |
| commit | fca66335d131669cf017420af6963a7565babb58 (patch) | |
| tree | d54a9d27cbfd1edea58cf2714a5096ba6321a386 | |
| parent | 9ce8f1ff8e5298c4d921d9f0b4a3fc1f965b3f22 (diff) | |
| download | luajit-fca66335d131669cf017420af6963a7565babb58.tar.gz luajit-fca66335d131669cf017420af6963a7565babb58.tar.bz2 luajit-fca66335d131669cf017420af6963a7565babb58.zip | |
Always close profiler output file.
Reported by Guilherme Batalheiro. #1304
| -rw-r--r-- | src/jit/p.lua | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/jit/p.lua b/src/jit/p.lua index 36f836c5..ef2ee82f 100644 --- a/src/jit/p.lua +++ b/src/jit/p.lua | |||
| @@ -227,9 +227,7 @@ local function prof_finish() | |||
| 227 | local samples = prof_samples | 227 | local samples = prof_samples |
| 228 | if samples == 0 then | 228 | if samples == 0 then |
| 229 | if prof_raw ~= true then out:write("[No samples collected]\n") end | 229 | if prof_raw ~= true then out:write("[No samples collected]\n") end |
| 230 | return | 230 | elseif prof_ann then |
| 231 | end | ||
| 232 | if prof_ann then | ||
| 233 | prof_annotate(prof_count1, samples) | 231 | prof_annotate(prof_count1, samples) |
| 234 | else | 232 | else |
| 235 | prof_top(prof_count1, prof_count2, samples, "") | 233 | prof_top(prof_count1, prof_count2, samples, "") |
