[Lldb-commits] [lldb] r172012 - /lldb/trunk/tools/debugserver/source/MacOSX/MachTask.cpp
Han Ming Ong
hanming at apple.com
Wed Jan 9 14:37:34 PST 2013
Author: hanming
Date: Wed Jan 9 16:37:34 2013
New Revision: 172012
URL: http://llvm.org/viewvc/llvm-project?rev=172012&view=rev
Log:
<rdar://problem/12975489>
1. Using mach port number, just like when inferior is paused.
2. Use key:value pair of thread used time instead of comma separated notation.
Modified:
lldb/trunk/tools/debugserver/source/MacOSX/MachTask.cpp
Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachTask.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachTask.cpp?rev=172012&r1=172011&r2=172012&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachTask.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachTask.cpp Wed Jan 9 16:37:34 2013
@@ -255,7 +255,7 @@
if (kr != KERN_SUCCESS) continue;
if ((basic_info.flags & TH_FLAGS_IDLE) == 0) {
- threads_id.push_back(identifier_info.thread_id);
+ threads_id.push_back(threads[i]);
if (identifier_info.thread_handle != 0) {
struct proc_threadinfo proc_threadinfo;
@@ -338,11 +338,10 @@
profile_data_stream << "elapsed_usec:" << elapsed_usec << ';';
profile_data_stream << "task_used_usec:" << task_used_usec << ';';
- profile_data_stream << "threads_used_usec:" << num_threads;
for (int i=0; i<num_threads; i++) {
- profile_data_stream << ',' << threads_id[i];
+ profile_data_stream << "thread_used_id:" << std::hex << threads_id[i] << std::dec << ';';
- profile_data_stream << ',';
+ profile_data_stream << "thread_used_name:";
int len = threads_name[i].size();
if (len) {
const char *thread_name = threads_name[i].c_str();
@@ -356,10 +355,10 @@
// Reset back to DECIMAL.
profile_data_stream << DECIMAL;
}
+ profile_data_stream << ';';
- profile_data_stream << ',' << threads_used_usec[i];
+ profile_data_stream << "thread_used_usec:" << threads_used_usec[i] << ';';
}
- profile_data_stream << ';';
profile_data_stream << "wired:" << vm_stats.wire_count * vm_page_size << ';';
profile_data_stream << "active:" << vm_stats.active_count * vm_page_size << ';';
More information about the lldb-commits
mailing list