Skip to content

Commit 2d10f85

Browse files
committed
fixed mixed output of adapter and regular traces
Fixed #2002 issue. Regular UR tracing prints now calls in two separate lines like PI does.
1 parent 4517290 commit 2d10f85

File tree

3 files changed

+1915
-812
lines changed

3 files changed

+1915
-812
lines changed

scripts/templates/trcddi.cpp.mako

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,15 +45,17 @@ namespace ur_tracing_layer
4545
${th.make_pfncb_param_type(n, tags, obj)} params = { &${",&".join(th.make_param_lines(n, tags, obj, format=["name"]))} };
4646
uint64_t instance = getContext()->notify_begin(${th.make_func_etor(n, tags, obj)}, "${th.make_func_name(n, tags, obj)}", &params);
4747

48-
getContext()->logger.info("---> ${th.make_func_name(n, tags, obj)}");
48+
std::ostringstream args_str_before;
49+
ur::extras::printFunctionParams(args_str_before, ${th.make_func_etor(n, tags, obj)}, &params);
50+
getContext()->logger.info(" ---> ${th.make_func_name(n, tags, obj)}({})\n", args_str_before.str());
4951

5052
${x}_result_t result = ${th.make_pfn_name(n, tags, obj)}( ${", ".join(th.make_param_lines(n, tags, obj, format=["name"]))} );
5153

5254
getContext()->notify_end(${th.make_func_etor(n, tags, obj)}, "${th.make_func_name(n, tags, obj)}", &params, &result, instance);
5355

54-
std::ostringstream args_str;
55-
ur::extras::printFunctionParams(args_str, ${th.make_func_etor(n, tags, obj)}, &params);
56-
getContext()->logger.info("({}) -> {};\n", args_str.str(), result);
56+
std::ostringstream args_str_after;
57+
ur::extras::printFunctionParams(args_str_after, ${th.make_func_etor(n, tags, obj)}, &params);
58+
getContext()->logger.info(" <--- ${th.make_func_name(n, tags, obj)}({}) -> {};\n", args_str_after.str(), result);
5759

5860
return result;
5961
}

0 commit comments

Comments
 (0)