MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / finishSessionProcedure

Method finishSessionProcedure

src/jrd/ProfilerManager.cpp:257–275  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

255}
256
257IExternalResultSet* ProfilerPackage::finishSessionProcedure(ThrowStatusExceptionWrapper* /*status*/,
258 IExternalContext* context, const FinishSessionInput::Type* in, void* out)
259{
260 const auto tdbb = JRD_get_thread_data();
261 const auto attachment = tdbb->getAttachment();
262
263 if (!in->attachmentIdNull && AttNumber(in->attachmentId) != attachment->att_attachment_id)
264 {
265 ProfilerIpc ipc(tdbb, *getDefaultMemoryPool(), in->attachmentId);
266 ipc.send(tdbb, ProfilerIpc::Tag::FINISH_SESSION, in);
267 return nullptr;
268 }
269
270 const auto profilerManager = attachment->getProfilerManager(tdbb);
271
272 profilerManager->finishSession(tdbb, in->flush);
273
274 return nullptr;
275}
276
277IExternalResultSet* ProfilerPackage::pauseSessionProcedure(ThrowStatusExceptionWrapper* /*status*/,
278 IExternalContext* context, const PauseSessionInput::Type* in, void* out)

Callers

nothing calls this directly

Calls 6

JRD_get_thread_dataFunction · 0.85
getDefaultMemoryPoolFunction · 0.85
getProfilerManagerMethod · 0.80
finishSessionMethod · 0.80
getAttachmentMethod · 0.45
sendMethod · 0.45

Tested by

no test coverage detected