<rdar://problem/12720514> Sub-TLF: Provide service to profile the inferior

This allows client to query profiling states on the inferior.

llvm-svn: 168228
This commit is contained in:
Han Ming Ong
2012-11-17 00:21:04 +00:00
parent f1b6177b62
commit ab3b8b22a1
21 changed files with 756 additions and 14 deletions

View File

@@ -366,6 +366,29 @@ SBProcess::GetSTDERR (char *dst, size_t dst_len) const
return bytes_read;
}
size_t
SBProcess::GetAsyncProfileData(char *dst, size_t dst_len) const
{
size_t bytes_read = 0;
ProcessSP process_sp(GetSP());
if (process_sp)
{
Error error;
bytes_read = process_sp->GetAsyncProfileData (dst, dst_len, error);
}
LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (log)
log->Printf ("SBProcess(%p)::GetProfileData (dst=\"%.*s\", dst_len=%llu) => %llu",
process_sp.get(),
(int) bytes_read,
dst,
(uint64_t)dst_len,
(uint64_t)bytes_read);
return bytes_read;
}
void
SBProcess::ReportEventState (const SBEvent &event, FILE *out) const
{