From dabc7bc2d846f3c91f8a868df6d4568c40bea53f Mon Sep 17 00:00:00 2001 From: Kevin Menard Date: Fri, 4 Oct 2024 14:45:30 -0400 Subject: [PATCH] YJIT: Make timestamps the first element in the YJIT compilation log tuple. --- yjit.rb | 4 ++-- yjit/src/compilation_log.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/yjit.rb b/yjit.rb index 5408e7d954b11e..773e5373ea3559 100644 --- a/yjit.rb +++ b/yjit.rb @@ -191,8 +191,8 @@ def self.stats_string def self.compilation_log return nil unless compilation_log_enabled? - Primitive.rb_yjit_get_compilation_log.map do |path, timestamp| - [path, Time.at(timestamp)] + Primitive.rb_yjit_get_compilation_log.map do |timestamp, path| + [Time.at(timestamp), path] end end diff --git a/yjit/src/compilation_log.rs b/yjit/src/compilation_log.rs index 3c3c64ccfea6ea..228a749b8ffb46 100644 --- a/yjit/src/compilation_log.rs +++ b/yjit/src/compilation_log.rs @@ -230,8 +230,8 @@ fn rb_yjit_get_compilation_log_array() -> VALUE { for entry in log.iter() { unsafe { let entry_array = rb_ary_new_capa(2); - rb_ary_push(entry_array, entry.payload.to_string().into()); rb_ary_push(entry_array, rb_float_new(entry.timestamp)); + rb_ary_push(entry_array, entry.payload.to_string().into()); rb_ary_push(array, entry_array); } }