Commit e1a2cd9f authored by Brice Videau's avatar Brice Videau

Added missing meta-data to opencl_model.yaml file.

parent 0b7b4477
Pipeline #12891 failed with stage
......@@ -10,6 +10,7 @@ enums = {}
objects = CL_OBJECTS + CL_EXT_OBJECTS
int_scalars = CL_INT_SCALARS
float_scalars = CL_FLOAT_SCALARS
lttng_enums = {}
events = {}
res = {
......@@ -19,6 +20,7 @@ res = {
"int_scalars" => int_scalars,
"float_scalars" => float_scalars,
"type_map" => CL_TYPE_MAP,
"lttng_enums" => lttng_enums,
"events" => events
}
......@@ -163,6 +165,13 @@ YAML::load_file(File.join(SRC_DIR,"opencl_wrapper_events.yaml")).each { |namespa
}
YAML::load_file(File.join(SRC_DIR,"opencl_events.yaml")).each { |namespace, h|
if h["enums"]
h["enums"].each { |e|
lttng_enums[e["name"]] = {
values: e["values"].collect { |v| { type: v[0], name: v[1], value: v[2] }}
}
}
end
h["events"].each { |e|
event = get_fields(e["args"], e["fields"])
events["#{namespace}:#{e["name"]}"] = event
......
......@@ -18,6 +18,10 @@ class LTTng
args[0].match("string")
end
def self.enum?(*args)
args[0].match("enum")
end
def self.expression(*args)
case args[0]
when "ctf_string"
......@@ -107,6 +111,9 @@ def get_field(args, field)
res["string"] = true
res.delete("pointer")
end
if LTTng.enum?(*field)
res["enum_type"] = field[2]
end
res["lttng"] = field[0]
[ name, res ]
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment