diff options
| author | Stefan Monnier | 2012-09-24 22:30:46 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2012-09-24 22:30:46 -0400 |
| commit | 6521894d1aa5a1017dd6f3f55b5e7c11dde5d004 (patch) | |
| tree | f74f3953cb1ff8905eb9e7b3e3cc39bae8edd18c /src/alloc.c | |
| parent | ad942b63d7a9b984752f46bc2049fe10e488230d (diff) | |
| download | emacs-6521894d1aa5a1017dd6f3f55b5e7c11dde5d004.tar.gz emacs-6521894d1aa5a1017dd6f3f55b5e7c11dde5d004.zip | |
* src/profiler.c: Rename sample_profiler_* to profiler_cpu_* and
memory_profiler_* to profiler_memory_*. Move sigprof_handler before
its first use, inside the PROFILER_CPU_SUPPORT conditional.
Diffstat (limited to 'src/alloc.c')
| -rw-r--r-- | src/alloc.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/src/alloc.c b/src/alloc.c index 2fc93f825d1..8c0f99cbb05 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -5447,7 +5447,7 @@ See Info node `(elisp)Garbage Collection'. */) | |||
| 5447 | FOR_EACH_BUFFER (nextb) | 5447 | FOR_EACH_BUFFER (nextb) |
| 5448 | compact_buffer (nextb); | 5448 | compact_buffer (nextb); |
| 5449 | 5449 | ||
| 5450 | if (memory_profiler_running) | 5450 | if (profiler_memory_running) |
| 5451 | tot_before = total_bytes_of_live_objects (); | 5451 | tot_before = total_bytes_of_live_objects (); |
| 5452 | 5452 | ||
| 5453 | start = current_emacs_time (); | 5453 | start = current_emacs_time (); |
| @@ -5726,15 +5726,12 @@ See Info node `(elisp)Garbage Collection'. */) | |||
| 5726 | gcs_done++; | 5726 | gcs_done++; |
| 5727 | 5727 | ||
| 5728 | /* Collect profiling data. */ | 5728 | /* Collect profiling data. */ |
| 5729 | if (memory_profiler_running) | 5729 | if (profiler_memory_running) |
| 5730 | { | 5730 | { |
| 5731 | size_t swept = 0; | 5731 | size_t swept = 0; |
| 5732 | if (memory_profiler_running) | 5732 | size_t tot_after = total_bytes_of_live_objects (); |
| 5733 | { | 5733 | if (tot_before > tot_after) |
| 5734 | size_t tot_after = total_bytes_of_live_objects (); | 5734 | swept = tot_before - tot_after; |
| 5735 | if (tot_before > tot_after) | ||
| 5736 | swept = tot_before - tot_after; | ||
| 5737 | } | ||
| 5738 | malloc_probe (swept); | 5735 | malloc_probe (swept); |
| 5739 | } | 5736 | } |
| 5740 | 5737 | ||