d226c0d97d
Add the string length parameter to the set_name(), set_value() function to remove the conversion from char* to std::string which takes extra work like calling strlen() to compute the string length. From the callback sampling in the perfetto tracing, the ratio of trace_payload_as_extra_intel_end_draw_indexed to intel_ds_end_draw_indexed drops from 63.80% to 59.65% with this change. v2: Add the data of the callback sampling to the description. Signed-off-by: Andy Hsu <hwandy@google.com> Reviewed-by: Yiwei Zhang <zzyiwei@chromium.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38073>