[Lldb-commits] [lldb] r240739 - Use the right ifdef macro, reviewed by Jason
Han Ming Ong
hanming at apple.com
Thu Jun 25 17:04:51 PDT 2015
Author: hanming
Date: Thu Jun 25 19:04:51 2015
New Revision: 240739
URL: http://llvm.org/viewvc/llvm-project?rev=240739&view=rev
Log:
Use the right ifdef macro, reviewed by Jason
Modified:
lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm
lldb/trunk/tools/debugserver/source/MacOSX/MachVMMemory.cpp
lldb/trunk/tools/debugserver/source/MacOSX/MachVMMemory.h
Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm?rev=240739&r1=240738&r2=240739&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm Thu Jun 25 19:04:51 2015
@@ -384,7 +384,7 @@ MachTask::GetProfileData (DNBProfileData
#if defined (HOST_VM_INFO64_COUNT)
vm_statistics64_data_t vminfo;
-#elif
+#else
struct vm_statistics vminfo;
#endif
uint64_t physical_memory;
@@ -450,7 +450,7 @@ MachTask::GetProfileData (DNBProfileData
{
#if defined (HOST_VM_INFO64_COUNT)
static vm_size_t pagesize = vm_kernel_page_size;
-#elif
+#else
static vm_size_t pagesize;
static bool calculated = false;
if (!calculated)
@@ -468,7 +468,7 @@ MachTask::GetProfileData (DNBProfileData
#if defined (HOST_VM_INFO64_COUNT)
// This mimicks Activity Monitor.
uint64_t total_used_count = (physical_memory / vm_kernel_page_size) - (vminfo.free_count - vminfo.speculative_count) - vminfo.external_page_count - vminfo.purgeable_count;
-#elif
+#else
uint64_t total_used_count = vminfo.wire_count + vminfo.inactive_count + vminfo.active_count;
#endif
profile_data_stream << "used:" << total_used_count * pagesize << ';';
Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachVMMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachVMMemory.cpp?rev=240739&r1=240738&r2=240739&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachVMMemory.cpp (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachVMMemory.cpp Thu Jun 25 19:04:51 2015
@@ -420,7 +420,7 @@ GetPurgeableAndAnonymous(task_t task, ui
#if defined (HOST_VM_INFO64_COUNT)
nub_bool_t
MachVMMemory::GetMemoryProfile(DNBProfileDataScanType scanType, task_t task, struct task_basic_info ti, cpu_type_t cputype, nub_process_t pid, vm_statistics64_data_t &vminfo, uint64_t &physical_memory, mach_vm_size_t &rprvt, mach_vm_size_t &rsize, mach_vm_size_t &vprvt, mach_vm_size_t &vsize, mach_vm_size_t &dirty_size, mach_vm_size_t &purgeable, mach_vm_size_t &anonymous)
-#elif
+#else
nub_bool_t
MachVMMemory::GetMemoryProfile(DNBProfileDataScanType scanType, task_t task, struct task_basic_info ti, cpu_type_t cputype, nub_process_t pid, vm_statistics_data_t &vminfo, uint64_t &physical_memory, mach_vm_size_t &rprvt, mach_vm_size_t &rsize, mach_vm_size_t &vprvt, mach_vm_size_t &vsize, mach_vm_size_t &dirty_size, mach_vm_size_t &purgeable, mach_vm_size_t &anonymous)
#endif
@@ -434,7 +434,7 @@ MachVMMemory::GetMemoryProfile(DNBProfil
#if defined (HOST_VM_INFO64_COUNT)
mach_msg_type_number_t count = HOST_VM_INFO64_COUNT;
host_statistics64(localHost, HOST_VM_INFO64, (host_info64_t)&vminfo, &count);
-#elif
+#else
mach_msg_type_number_t count = HOST_VM_INFO_COUNT;
host_statistics(localHost, HOST_VM_INFO, (host_info_t)&vminfo, &count);
vminfo.wire_count += GetStolenPages(task);
Modified: lldb/trunk/tools/debugserver/source/MacOSX/MachVMMemory.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/source/MacOSX/MachVMMemory.h?rev=240739&r1=240738&r2=240739&view=diff
==============================================================================
--- lldb/trunk/tools/debugserver/source/MacOSX/MachVMMemory.h (original)
+++ lldb/trunk/tools/debugserver/source/MacOSX/MachVMMemory.h Thu Jun 25 19:04:51 2015
@@ -30,7 +30,7 @@ public:
nub_bool_t GetMemoryRegionInfo(task_t task, nub_addr_t address, DNBRegionInfo *region_info);
#if defined (HOST_VM_INFO64_COUNT)
nub_bool_t GetMemoryProfile(DNBProfileDataScanType scanType, task_t task, struct task_basic_info ti, cpu_type_t cputype, nub_process_t pid, vm_statistics64_data_t &vminfo, uint64_t &physical_memory, mach_vm_size_t &rprvt, mach_vm_size_t &rsize, mach_vm_size_t &vprvt, mach_vm_size_t &vsize, mach_vm_size_t &dirty_size, mach_vm_size_t &purgeable, mach_vm_size_t &anonymous);
-#elif
+#else
nub_bool_t GetMemoryProfile(DNBProfileDataScanType scanType, task_t task, struct task_basic_info ti, cpu_type_t cputype, nub_process_t pid, vm_statistics_data_t &vminfo, uint64_t &physical_memory, mach_vm_size_t &rprvt, mach_vm_size_t &rsize, mach_vm_size_t &vprvt, mach_vm_size_t &vsize, mach_vm_size_t &dirty_size, mach_vm_size_t &purgeable, mach_vm_size_t &anonymous);
#endif
More information about the lldb-commits
mailing list