File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -177,10 +177,14 @@ class plugin {
177
177
uint64_t CorrelationID = pi::emitFunctionBeginTrace (PIFnName);
178
178
uint64_t CorrelationIDWithArgs = 0 ;
179
179
unsigned char *ArgsDataPtr = nullptr ;
180
+ using PackCallArgumentsTy =
181
+ decltype (packCallArguments<PiApiOffset>(std::forward<ArgsT>(Args)...));
182
+ auto ArgsData =
183
+ xptiTraceEnabled ()
184
+ ? packCallArguments<PiApiOffset>(std::forward<ArgsT>(Args)...)
185
+ : PackCallArgumentsTy{};
180
186
// TODO check if stream is observed when corresponding API is present.
181
187
if (xptiTraceEnabled ()) {
182
- auto ArgsData =
183
- packCallArguments<PiApiOffset>(std::forward<ArgsT>(Args)...);
184
188
ArgsDataPtr = ArgsData.data ();
185
189
CorrelationIDWithArgs = pi::emitFunctionWithArgsBeginTrace (
186
190
static_cast <uint32_t >(PiApiOffset), PIFnName, ArgsDataPtr, *MPlugin);
You can’t perform that action at this time.
0 commit comments