Skip to content

Commit

Permalink
fixed mixed output of adapter and regular traces
Browse files Browse the repository at this point in the history
Fixed #2002 issue.
Regular UR tracing prints now calls in two separate lines like PI does.
  • Loading branch information
lslusarczyk committed Sep 19, 2024
1 parent 4517290 commit 2d10f85
Show file tree
Hide file tree
Showing 3 changed files with 1,915 additions and 812 deletions.
10 changes: 6 additions & 4 deletions scripts/templates/trcddi.cpp.mako
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,17 @@ namespace ur_tracing_layer
${th.make_pfncb_param_type(n, tags, obj)} params = { &${",&".join(th.make_param_lines(n, tags, obj, format=["name"]))} };
uint64_t instance = getContext()->notify_begin(${th.make_func_etor(n, tags, obj)}, "${th.make_func_name(n, tags, obj)}", &params);

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

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

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

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

return result;
}
Expand Down
Loading

0 comments on commit 2d10f85

Please sign in to comment.