*
* \retval 1 on success, 0 on failure
*/
-static int SCPerfAddToClubbedTMTable(ThreadVars *tv, SCPerfPublicContext *pctx)
+static int SCPerfAddToClubbedTMTable(const char *thread_name, SCPerfPublicContext *pctx)
{
if (sc_perf_op_ctx == NULL) {
SCLogDebug("Counter module has been disabled");
SCPerfClubTMInst *temp = NULL;
- if (tv == NULL || pctx == NULL) {
+ if (thread_name == NULL || pctx == NULL) {
SCLogDebug("supplied argument(s) to SCPerfAddToClubbedTMTable NULL");
return 0;
}
temp->ctx = pctx;
- temp->name = SCStrdup(tv->name);
+ temp->name = SCStrdup(thread_name);
if (unlikely(temp->name == NULL)) {
SCFree(temp);
SCMutexUnlock(&sc_perf_op_ctx->pctmi_lock);
{
SCPerfGetAllCountersArray(&(tv)->perf_public_ctx, &(tv)->perf_private_ctx);
- SCPerfAddToClubbedTMTable(tv, &(tv)->perf_public_ctx);
+ SCPerfAddToClubbedTMTable(tv->name, &(tv)->perf_public_ctx);
return 0;
}