diff --git a/script/gen_ostream_ops.py b/script/gen_ostream_ops.py index aacbd7ce37..b9a52a302b 100755 --- a/script/gen_ostream_ops.py +++ b/script/gen_ostream_ops.py @@ -191,7 +191,7 @@ def gen_cppheader(infilepath, outfilepath, rank): if len(cppHeader.classes[c]["properties"]["public"]) != 0: output_filename_h.write("inline static std::ostream& operator<<(std::ostream& out, const " + c + "& v)\n") output_filename_h.write("{\n") - output_filename_h.write(" roctracer::" + apiname.lower() + "_support::detail::operator<<(out, '{');\n") + output_filename_h.write(" std::operator<<(out, '{');\n") output_filename_h.write(" " + apiname.upper() + "_depth_max_cnt++;\n") output_filename_h.write(" if (" + apiname.upper() + "_depth_max == -1 || " + apiname.upper() + "_depth_max_cnt <= " + apiname.upper() + "_depth_max" + ") {\n" ) process_struct(output_filename_h, c, cppHeader, "", apiname) @@ -200,7 +200,7 @@ def gen_cppheader(infilepath, outfilepath, rank): output_filename_h.write(global_str) output_filename_h.write(" };\n") output_filename_h.write(" " + apiname.upper() + "_depth_max_cnt--;\n") - output_filename_h.write(" roctracer::" + apiname.lower() + "_support::detail::operator<<(out, '}');\n") + output_filename_h.write(" std::operator<<(out, '}');\n") output_filename_h.write(" return out;\n") output_filename_h.write("}\n") global_str = '' diff --git a/script/hsaap.py b/script/hsaap.py index 2aa0742c8f..7d5813c7f0 100755 --- a/script/hsaap.py +++ b/script/hsaap.py @@ -441,8 +441,7 @@ class API_DescrParser: content += '\n' if ret_type != 'void': - # FIXME: we should capture the return value and store it in the api_data - content += ' ' + ret_type + ' ret =' + content += ' trace_data.api_data.' + ret_type + '_retval = ' content += ' ' + name + '_saved_before_cb.' + call + '_fn(' + ', '.join(struct['alst']) + ');\n' content += '\n' @@ -450,8 +449,7 @@ class API_DescrParser: content += ' trace_data.phase_exit(' + call_id + ', &trace_data);\n' if ret_type != 'void': - content += '\n' - content += ' return ret;\n' + content += ' return trace_data.api_data.' + ret_type + '_retval;\n' content += '}\n' return content