37std::vector<OUString> g_aRecording;
43 std::lock_guard aGuard(g_aMutex);
45 g_aRecording.emplace_back(sObject);
50 (*s_pBufferFullCallback)();
59 oslProcessInfo aProcessInfo;
60 aProcessInfo.Size =
sizeof(oslProcessInfo);
61 if (osl_getProcessInfo(
nullptr, osl_Process_IDENTIFIER, &aProcessInfo) == osl_Process_E_None)
62 nPid = aProcessInfo.Ident;
66 + OUString(
sName, strlen(
sName), RTL_TEXTENCODING_UTF8)
72 + OUString::number(nPid)
75 + OUString::number(osl_getThreadIdentifier(
nullptr)) +
"},");
80 std::lock_guard aGuard(g_aMutex);
95 std::vector<OUString> aRecording;
97 std::lock_guard aGuard(g_aMutex);
100 aRecording.swap(g_aRecording);
113void ProfileZone::addRecording()
115 assert(s_bRecording);
117 long long nNow = getNow();
126 + OUString::number(m_nCreateTime)
129 + OUString::number(nNow - m_nCreateTime) + m_sArgs
132 + OUString::number(m_nPid)
135 + OUString::number(osl_getThreadIdentifier(
nullptr)) +
"},");
static std::size_t s_nBufferSize
static void addRecording(const OUString &sObject)
static std::atomic< bool > s_bRecording
static void setBufferSizeAndCallback(std::size_t bufferSize, void(*bufferFullCallback)())
static void(* s_pBufferFullCallback)()
static long long getNow()
static void stopRecording()
static void addInstantEvent(const char *sName, const std::map< OUString, OUString > &args=std::map< OUString, OUString >())
static std::vector< OUString > getEventVectorAndClear()
static OUString createArgsString(const std::map< OUString, OUString > &args)
static css::uno::Sequence< OUString > getRecordingAndClear()
static void startRecording()
static thread_local int nProfileZoneNesting
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
Copy from a container into a Sequence.