• Home
  • Raw
  • Download

Lines Matching refs:ctx

147                     if (auto ctx = weakCtx.lock(); ctx != nullptr) {  in StartPluginSessions()  local
148 ctx->StopPluginSessions(); in StartPluginSessions()
310 auto ctx = std::make_shared<SessionContext>(); in CreateSession() local
311 CHECK_POINTER_NOTNULL(ctx, "alloc SessionContext failed!"); in CreateSession()
314 ctx->service = this; in CreateSession()
316 ctx->dataRepeater = dataRepeater; in CreateSession()
319 ctx->traceFileWriter = traceWriter; in CreateSession()
321 ctx->sessionConfig = sessionConfig; in CreateSession()
322 ctx->pluginNames = std::move(pluginNames); in CreateSession()
323 ctx->pluginConfigs = std::move(pluginConfigs); in CreateSession()
324 ctx->bufferConfigs = std::move(bufferConfigs); in CreateSession()
327 CHECK_EXPRESSION_TRUE(ctx->CreatePluginSessions(), "create plugin sessions failed!"); in CreateSession()
330 ctx->id = sessionId; in CreateSession()
331 ctx->name = "session-" + std::to_string(sessionId); in CreateSession()
334 CHECK_EXPRESSION_TRUE(AddSessionContext(sessionId, ctx), "sessionId conflict!"); in CreateSession()
341 ctx->SetKeepAliveTime(keepAliveTime); in CreateSession()
342 ctx->StartSessionExpireTask(); in CreateSession()
487 auto ctx = GetSessionContext(sessionId); in StartSession() local
488 CHECK_POINTER_NOTNULL(ctx, "session_id invalid!"); in StartSession()
492 …std::set_intersection(requestNames.begin(), requestNames.end(), ctx->pluginNames.begin(), ctx->plu… in StartSession()
500 size_t updates = ctx->UpdatePluginConfigs(newPluginConfigs); in StartSession()
503 CHECK_EXPRESSION_TRUE(ctx->CreatePluginSessions(), "refresh sessions failed!"); in StartSession()
508 CHECK_EXPRESSION_TRUE(ctx->StartPluginSessions(), "start plugin sessions failed!"); in StartSession()
528 auto ctx = GetSessionContext(sessionId); in FetchData() local
529 CHECK_POINTER_NOTNULL(ctx, "session_id invalid!"); in FetchData()
532 …CHECK_EXPRESSION_TRUE(pluginSessionManager_->CheckStatus(ctx->pluginNames, PluginSession::STARTED), in FetchData()
535 if (ctx->sessionConfig.session_mode() == ProfilerSessionConfig::ONLINE) { in FetchData()
536 auto dataRepeater = ctx->dataRepeater; in FetchData()
540 ctx = GetSessionContext(sessionId); in FetchData()
541 CHECK_POINTER_NOTNULL(ctx, "session_id invalid!"); in FetchData()
584 auto ctx = GetSessionContext(sessionId); in StopSession() local
585 CHECK_POINTER_NOTNULL(ctx, "session_id invalid!"); in StopSession()
586 CHECK_EXPRESSION_TRUE(ctx->StopPluginSessions(), "stop plugin sessions failed!"); in StopSession()
601 auto ctx = GetSessionContext(sessionId); in DestroySession() local
602 CHECK_POINTER_NOTNULL(ctx, "session_id invalid!"); in DestroySession()
605 CHECK_EXPRESSION_TRUE(pluginSessionManager_->RemovePluginSessions(ctx->pluginNames), in DestroySession()
609 if (ctx->sessionConfig.session_mode() == ProfilerSessionConfig::OFFLINE) { in DestroySession()
612 for (size_t i = 0; i < ctx->pluginNames.size(); i++) { in DestroySession()
613 auto pluginName = ctx->pluginNames[i]; in DestroySession()
616 std::string file = ctx->sessionConfig.result_file(); in DestroySession()
617 if (ctx->sessionConfig.split_file()) { in DestroySession()
618 file = ctx->traceFileWriter.get()->Path(); in DestroySession()
638 auto ctx = GetSessionContext(sessionId); in KeepSession() local
639 CHECK_POINTER_NOTNULL(ctx, "session_id invalid!"); in KeepSession()
645 ctx->SetKeepAliveTime(keepAliveTime); in KeepSession()
649 if (ctx->timeoutTask.size() > 0) { in KeepSession()
650 ctx->StopSessionExpireTask(); in KeepSession()
651 ctx->StartSessionExpireTask(); in KeepSession()