Project

General

Profile

Actions

Bug #7500

closed

Improve GC profiler timings on linux

Added by tmm1 (Aman Karmani) over 11 years ago. Updated over 11 years ago.

Status:
Closed
Target version:
ruby -v:
ruby 2.0.0dev (2012-12-03 trunk 38149) [x86_64-darwin12.2.0]
Backport:
[ruby-core:50495]

Description

On linux kernels, getrusage()'s precision depends on the value of HZ when the kernel was compiled. By default, HZ=250 provides a 4ms granularity.

This patch uses clock_gettime() with CLOCK_PROCESS_CPUTIME_ID when available, which provides a 1ns precision on linux.


Files

gc_timing.patch (586 Bytes) gc_timing.patch tmm1 (Aman Karmani), 12/03/2012 11:32 AM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0