{
int ret;
+ ret = mi_lttng_writer_open_element(writer, config_element_attributes);
+ if (ret) {
+ goto end;
+ }
+
+ ret = mi_lttng_writer_open_element(writer, config_element_probe_attributes);
+ if (ret) {
+ goto end;
+ }
+
if (event->attr.probe.addr != 0) {
/* event probe address */
ret = mi_lttng_writer_write_element_unsigned_int(writer,
goto end;
}
}
+
+ /* Close probe_attributes and attributes */
+ ret = mi_lttng_close_multi_element(writer, 2);
end:
return ret;
}
int mi_lttng_event_function_entry(struct mi_writer *writer,
struct lttng_event *event)
{
+ int ret;
+
+ ret = mi_lttng_writer_open_element(writer, config_element_attributes);
+ if (ret) {
+ goto end;
+ }
+
+ ret = mi_lttng_writer_open_element(writer, config_element_probe_attributes);
+ if (ret) {
+ goto end;
+ }
+
/* event probe symbol_name */
- return mi_lttng_writer_write_element_string(writer,
+ ret = mi_lttng_writer_write_element_string(writer,
config_element_symbol_name, event->attr.ftrace.symbol_name);
+ if (ret) {
+ goto end;
+ }
+
+ /* Close function_attributes and attributes */
+ ret = mi_lttng_close_multi_element(writer, 2);
+end:
+ return ret;
}
LTTNG_HIDDEN
}
break;
}
+ case LTTNG_EVENT_FUNCTION:
+ /* Fallthrough */
case LTTNG_EVENT_PROBE:
ret = mi_lttng_event_function_probe(writer, event);
break;
<!-- Maps to the lttng_event_probe_attr struct -->
<xs:complexType name="event_probe_attributes_type">
<xs:all>
- <xs:element name="address" type="uint64_type" />
- <xs:element name="offset" type="uint64_type" />
- <xs:element name="symbol_name" type="name_type" />
+ <xs:element name="address" type="uint64_type" minOccurs="0" />
+ <xs:element name="offset" type="uint64_type" minOccurs="0" />
+ <xs:element name="symbol_name" type="name_type" minOccurs="0" />
</xs:all>
</xs:complexType>