Skip to content

Commit

Permalink
YJIT: Make timestamps the first element in the YJIT compilation log t…
Browse files Browse the repository at this point in the history
…uple.
  • Loading branch information
nirvdrum committed Oct 7, 2024
1 parent d669d39 commit dabc7bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions yjit.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion yjit/src/compilation_log.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down

0 comments on commit dabc7bc

Please sign in to comment.