Skip to content

Commit

Permalink
Better name
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Applencourt committed Nov 21, 2023
1 parent 88cfc0b commit 37138bc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions utils/babeltrace_to_metababel_model.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env ruby
# Disclaimer: This script has been only tested on HIP model.
# Disclaimer: This script has been only tested on HIP, and ZE model.

require 'yaml'

Expand All @@ -9,7 +9,7 @@


# Just look in the payload, good enough for now
HIP_STRUCT_TYPES = model[:event_classes].map { |f|
STRUCT_TYPES = model[:event_classes].map { |f|
f[:payload].filter_map { |l|
native = l[:class]
cast = l[:cast_type]
Expand Down Expand Up @@ -68,7 +68,7 @@ def get_field_class_properties(field, member_name)
field_properties[:length_field_path] = "EVENT_PAYLOAD[\"_#{member_name}_length\"]" if field_properties[:type] == 'array_dynamic'

# Special casting case for struct <-> string.
field_properties[:cast_type_is_struct] = true if HIP_STRUCT_TYPES.include?(field[:cast_type])
field_properties[:cast_type_is_struct] = true if STRUCT_TYPES.include?(field[:cast_type])

field_properties
end
Expand Down Expand Up @@ -119,7 +119,7 @@ def get_environment_entry(entry)
{ :name => entry[:name], :type => entry[:class] }
end

# THAPI interval and HIP model differ.
# THAPI interval and BTX model differ.
if model.key?(:stream_classes)
stream_class = model.delete(:stream_classes).pop
event_classes = model.delete(:event_classes)
Expand Down

0 comments on commit 37138bc

Please sign in to comment.