Author: hanming Date: Tue Feb 27 09:53:38 2018 New Revision: 326213 URL: http://llvm.org/viewvc/llvm-project?rev=326213&view=rev Log: Got rid of weak imports of libpenergy and libpsample because we are already requiring a modern macOS (at least 10.11)
Reviewer: Jason Molenda Modified: lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm Modified: lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj?rev=326213&r1=326212&r2=326213&view=diff ============================================================================== --- lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj (original) +++ lldb/trunk/tools/debugserver/debugserver.xcodeproj/project.pbxproj Tue Feb 27 09:53:38 2018 @@ -855,7 +855,7 @@ LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx*]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; - "LLDB_ENERGY_LFLAGS[sdk=macosx*]" = "-weak-lpmenergy -weak-lpmsample"; + "LLDB_ENERGY_LFLAGS[sdk=macosx*]" = "-lpmenergy -lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; OTHER_CFLAGS = ( @@ -909,12 +909,7 @@ SKIP_INSTALL = YES; "SKIP_INSTALL[sdk=iphoneos*]" = NO; STRIP_INSTALLED_PRODUCT = YES; - USER_HEADER_SEARCH_PATHS = ( - ./source, - ../../source, - "$(DERIVED_SOURCES_DIR)", - ../../include, - ); + USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = BuildAndIntegration; @@ -958,7 +953,7 @@ LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; - "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; + "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-lpmenergy -lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; OTHER_CFLAGS = ( @@ -1012,12 +1007,7 @@ "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; - USER_HEADER_SEARCH_PATHS = ( - ./source, - ../../source, - "$(DERIVED_SOURCES_DIR)", - ../../include, - ); + USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = Debug; @@ -1060,7 +1050,7 @@ LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; - "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; + "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-lpmenergy -lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; OTHER_CFLAGS = ( @@ -1114,12 +1104,7 @@ "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; - USER_HEADER_SEARCH_PATHS = ( - ./source, - ../../source, - "$(DERIVED_SOURCES_DIR)", - ../../include, - ); + USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = Release; @@ -1171,7 +1156,7 @@ LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; - "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; + "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-lpmenergy -lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; ONLY_ACTIVE_ARCH = YES; @@ -1205,12 +1190,7 @@ "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; STRIP_INSTALLED_PRODUCT = NO; - USER_HEADER_SEARCH_PATHS = ( - ./source, - ../../source, - "$(DERIVED_SOURCES_DIR)", - ../../include, - ); + USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_BUILDER = "$(USER)"; ZERO_LINK = NO; @@ -1244,7 +1224,7 @@ LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; - "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; + "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-lpmenergy -lpmsample"; OTHER_CFLAGS = ( "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", @@ -1280,12 +1260,7 @@ "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; - USER_HEADER_SEARCH_PATHS = ( - ./source, - ../../source, - "$(DERIVED_SOURCES_DIR)", - ../../include, - ); + USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = DebugClang; @@ -1317,7 +1292,7 @@ LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; - "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; + "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-lpmenergy -lpmsample"; OTHER_CFLAGS = ( "$(LLDB_COMPRESSION_CFLAGS)", "$(LLDB_ZLIB_CFLAGS)", @@ -1356,12 +1331,7 @@ "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; - USER_HEADER_SEARCH_PATHS = ( - ./source, - ../../source, - "$(DERIVED_SOURCES_DIR)", - ../../include, - ); + USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = Release; @@ -1394,7 +1364,7 @@ LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx*]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; - "LLDB_ENERGY_LFLAGS[sdk=macosx*]" = "-weak-lpmenergy -weak-lpmsample"; + "LLDB_ENERGY_LFLAGS[sdk=macosx*]" = "-lpmenergy -lpmsample"; OTHER_CFLAGS = ( "-Wparentheses", "$(LLDB_ENERGY_CFLAGS)", @@ -1426,12 +1396,7 @@ SKIP_INSTALL = YES; "SKIP_INSTALL[sdk=iphoneos*]" = NO; STRIP_INSTALLED_PRODUCT = YES; - USER_HEADER_SEARCH_PATHS = ( - ./source, - ../../source, - "$(DERIVED_SOURCES_DIR)", - ../../include, - ); + USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = BuildAndIntegration; @@ -1519,7 +1484,7 @@ LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; - "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; + "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-lpmenergy -lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; OTHER_CFLAGS = ( @@ -1572,12 +1537,7 @@ "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; - USER_HEADER_SEARCH_PATHS = ( - ./source, - ../../source, - "$(DERIVED_SOURCES_DIR)", - ../../include, - ); + USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = DebugClang; @@ -1665,7 +1625,7 @@ LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; - "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; + "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-lpmenergy -lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; OTHER_CFLAGS = ( @@ -1717,12 +1677,7 @@ "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; - USER_HEADER_SEARCH_PATHS = ( - ./source, - ../../source, - "$(DERIVED_SOURCES_DIR)", - ../../include, - ); + USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = DebugPresubmission; @@ -1754,7 +1709,7 @@ LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; - "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; + "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-lpmenergy -lpmsample"; OTHER_CFLAGS = ( "-Wparentheses", "$(LLDB_ENERGY_CFLAGS)", @@ -1788,12 +1743,7 @@ "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; - USER_HEADER_SEARCH_PATHS = ( - ./source, - ../../source, - "$(DERIVED_SOURCES_DIR)", - ../../include, - ); + USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = DebugPresubmission; @@ -1885,7 +1835,7 @@ LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; - "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; + "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-lpmenergy -lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; OTHER_CFLAGS = ( @@ -1939,12 +1889,7 @@ "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; - USER_HEADER_SEARCH_PATHS = ( - ./source, - ../../source, - "$(DERIVED_SOURCES_DIR)", - ../../include, - ); + USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = "CustomSwift-Debug"; @@ -2022,7 +1967,7 @@ LLDB_ENERGY_CFLAGS = ""; "LLDB_ENERGY_CFLAGS[sdk=macosx.internal]" = "-DLLDB_ENERGY"; LLDB_ENERGY_LFLAGS = ""; - "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-weak-lpmenergy -weak-lpmsample"; + "LLDB_ENERGY_LFLAGS[sdk=macosx.internal]" = "-lpmenergy -lpmsample"; LLDB_ZLIB_CFLAGS = "-DHAVE_LIBZ=1"; LLDB_ZLIB_LDFLAGS = "-lz"; OTHER_CFLAGS = ( @@ -2075,12 +2020,7 @@ "SDKROOT[arch=x86_64]" = macosx; "SDKROOT[arch=x86_64h]" = macosx; SKIP_INSTALL = YES; - USER_HEADER_SEARCH_PATHS = ( - ./source, - ../../source, - "$(DERIVED_SOURCES_DIR)", - ../../include, - ); + USER_HEADER_SEARCH_PATHS = "./source ../../source $(DERIVED_SOURCES_DIR) ../../include"; ZERO_LINK = NO; }; name = "CustomSwift-Release"; 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=326213&r1=326212&r2=326213&view=diff ============================================================================== --- lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm (original) +++ lldb/trunk/tools/debugserver/source/MacOSX/MachTask.mm Tue Feb 27 09:53:38 2018 @@ -418,11 +418,13 @@ std::string MachTask::GetProfileData(DNB profile_data_stream << "phys_footprint:" << phys_footprint << ';'; } + + if (scanType & eProfileMemoryCap) { + profile_data_stream << "mem_cap:" << memory_cap << ';'; + } -// proc_pid_rusage pm_sample_task_and_pid pm_energy_impact needs to be tested -// for weakness in Cab #ifdef LLDB_ENERGY - if ((scanType & eProfileEnergy) && (pm_sample_task_and_pid != NULL)) { + if (scanType & eProfileEnergy) { struct rusage_info_v2 info; int rc = proc_pid_rusage(pid, RUSAGE_INFO_V2, (rusage_info_t *)&info); if (rc == 0) { _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits