From 21ef9950697ec951d5de6365f1c47f81cf2cf598 Mon Sep 17 00:00:00 2001 From: Aaron Clarke Date: Mon, 1 Jun 2020 14:27:35 -0700 Subject: [PATCH 1/4] started polling the gpu usage --- shell/platform/darwin/ios/BUILD.gn | 9 +- .../darwin/ios/framework/Source/IOKit.h | 229 ++++++++++++++++++ .../framework/Source/profiler_metrics_ios.mm | 121 ++++++++- shell/profiling/sampling_profiler.cc | 6 + shell/profiling/sampling_profiler.h | 8 + 5 files changed, 370 insertions(+), 3 deletions(-) create mode 100644 shell/platform/darwin/ios/framework/Source/IOKit.h diff --git a/shell/platform/darwin/ios/BUILD.gn b/shell/platform/darwin/ios/BUILD.gn index d6ebeb35e9afb..e8d1c67beed90 100644 --- a/shell/platform/darwin/ios/BUILD.gn +++ b/shell/platform/darwin/ios/BUILD.gn @@ -141,13 +141,18 @@ source_set("flutter_framework_source") { public_configs = [ "//flutter:config" ] libs = [ + "AudioToolbox.framework", "CoreMedia.framework", "CoreVideo.framework", - "UIKit.framework", "OpenGLES.framework", - "AudioToolbox.framework", "QuartzCore.framework", + "UIKit.framework", ] + if (flutter_runtime_mode == "profile" || flutter_runtime_mode == "debug") { + # This is required by the profiler_metrics_ios.mm to get GPU statistics. + # Usage in release builds will cause rejection from the App Store. + libs += [ "IOKit.framework" ] + } } ios_test_flutter_path = rebase_path("$root_out_dir/libios_test_flutter.dylib") diff --git a/shell/platform/darwin/ios/framework/Source/IOKit.h b/shell/platform/darwin/ios/framework/Source/IOKit.h new file mode 100644 index 0000000000000..e59dda944885f --- /dev/null +++ b/shell/platform/darwin/ios/framework/Source/IOKit.h @@ -0,0 +1,229 @@ +// Copyright 2013 The Flutter Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG || \ + FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_PROFILE +#ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_IOKIT_H_ +#define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_IOKIT_H_ + +#if __cplusplus +extern "C" { +#endif // __cplusplus + +#include +#include +#include + +static const char* kIOServicePlane = "IOService"; + +typedef char io_name_t[128]; +typedef char io_string_t[512]; +typedef char io_struct_inband_t[4096]; +typedef mach_port_t io_object_t; +typedef io_object_t io_registry_entry_t; +typedef io_object_t io_service_t; +typedef io_object_t io_connect_t; +typedef io_object_t io_iterator_t; + +enum { + kIOCFSerializeToBinary = 0x00000001U, +}; + +enum { + kIOReturnSuccess = 0, +}; + +enum { + kIORegistryIterateRecursively = 0x00000001U, + kIORegistryIterateParents = 0x00000002U, +}; + +enum { + kOSSerializeDictionary = 0x01000000U, + kOSSerializeArray = 0x02000000U, + kOSSerializeSet = 0x03000000U, + kOSSerializeNumber = 0x04000000U, + kOSSerializeSymbol = 0x08000000U, + kOSSerializeString = 0x09000000U, + kOSSerializeData = 0x0a000000U, + kOSSerializeBoolean = 0x0b000000U, + kOSSerializeObject = 0x0c000000U, + + kOSSerializeTypeMask = 0x7F000000U, + kOSSerializeDataMask = 0x00FFFFFFU, + + kOSSerializeEndCollection = 0x80000000U, + + kOSSerializeMagic = 0x000000d3U, +}; + +extern const mach_port_t kIOMasterPortDefault; + +CF_RETURNS_RETAINED CFDataRef IOCFSerialize(CFTypeRef object, + CFOptionFlags options); +CFTypeRef IOCFUnserializeWithSize(const char* buf, + size_t len, + CFAllocatorRef allocator, + CFOptionFlags options, + CFStringRef* err); + +kern_return_t IOObjectRetain(io_object_t object); +kern_return_t IOObjectRelease(io_object_t object); +boolean_t IOObjectConformsTo(io_object_t object, const io_name_t name); +uint32_t IOObjectGetKernelRetainCount(io_object_t object); +kern_return_t IOObjectGetClass(io_object_t object, io_name_t name); +CFStringRef IOObjectCopyClass(io_object_t object); +CFStringRef IOObjectCopySuperclassForClass(CFStringRef name); +CFStringRef IOObjectCopyBundleIdentifierForClass(CFStringRef name); + +io_registry_entry_t IORegistryGetRootEntry(mach_port_t master); +kern_return_t IORegistryEntryGetName(io_registry_entry_t entry, io_name_t name); +kern_return_t IORegistryEntryGetRegistryEntryID(io_registry_entry_t entry, + uint64_t* entryID); +kern_return_t IORegistryEntryGetPath(io_registry_entry_t entry, + const io_name_t plane, + io_string_t path); +kern_return_t IORegistryEntryGetProperty(io_registry_entry_t entry, + const io_name_t name, + io_struct_inband_t buffer, + uint32_t* size); +kern_return_t IORegistryEntryCreateCFProperties( + io_registry_entry_t entry, + CFMutableDictionaryRef* properties, + CFAllocatorRef allocator, + uint32_t options); +CFTypeRef IORegistryEntryCreateCFProperty(io_registry_entry_t entry, + CFStringRef key, + CFAllocatorRef allocator, + uint32_t options); +kern_return_t IORegistryEntrySetCFProperties(io_registry_entry_t entry, + CFTypeRef properties); + +kern_return_t IORegistryCreateIterator(mach_port_t master, + const io_name_t plane, + uint32_t options, + io_iterator_t* it); +kern_return_t IORegistryEntryCreateIterator(io_registry_entry_t entry, + const io_name_t plane, + uint32_t options, + io_iterator_t* it); +kern_return_t IORegistryEntryGetChildIterator(io_registry_entry_t entry, + const io_name_t plane, + io_iterator_t* it); +kern_return_t IORegistryEntryGetParentIterator(io_registry_entry_t entry, + const io_name_t plane, + io_iterator_t* it); +io_object_t IOIteratorNext(io_iterator_t it); +boolean_t IOIteratorIsValid(io_iterator_t it); +void IOIteratorReset(io_iterator_t it); + +CFMutableDictionaryRef IOServiceMatching(const char* name) CF_RETURNS_RETAINED; +CFMutableDictionaryRef IOServiceNameMatching(const char* name) + CF_RETURNS_RETAINED; +io_service_t IOServiceGetMatchingService(mach_port_t master, + CFDictionaryRef matching + CF_RELEASES_ARGUMENT); +kern_return_t IOServiceGetMatchingServices(mach_port_t master, + CFDictionaryRef matching + CF_RELEASES_ARGUMENT, + io_iterator_t* it); +kern_return_t _IOServiceGetAuthorizationID(io_service_t service, + uint64_t* authID); +kern_return_t _IOServiceSetAuthorizationID(io_service_t service, + uint64_t authID); +kern_return_t IOServiceOpen(io_service_t service, + task_t task, + uint32_t type, + io_connect_t* client); +kern_return_t IOServiceClose(io_connect_t client); +kern_return_t IOCloseConnection(io_connect_t client); +kern_return_t IOConnectAddRef(io_connect_t client); +kern_return_t IOConnectRelease(io_connect_t client); +kern_return_t IOConnectGetService(io_connect_t client, io_service_t* service); +kern_return_t IOConnectAddClient(io_connect_t client, io_connect_t other); +kern_return_t IOConnectSetNotificationPort(io_connect_t client, + uint32_t type, + mach_port_t port, + uintptr_t ref); +kern_return_t IOConnectMapMemory64(io_connect_t client, + uint32_t type, + task_t task, + mach_vm_address_t* addr, + mach_vm_size_t* size, + uint32_t options); +kern_return_t IOConnectUnmapMemory64(io_connect_t client, + uint32_t type, + task_t task, + mach_vm_address_t addr); +kern_return_t IOConnectSetCFProperties(io_connect_t client, + CFTypeRef properties); +kern_return_t IOConnectCallMethod(io_connect_t client, + uint32_t selector, + const uint64_t* in, + uint32_t inCnt, + const void* inStruct, + size_t inStructCnt, + uint64_t* out, + uint32_t* outCnt, + void* outStruct, + size_t* outStructCnt); +kern_return_t IOConnectCallScalarMethod(io_connect_t client, + uint32_t selector, + const uint64_t* in, + uint32_t inCnt, + uint64_t* out, + uint32_t* outCnt); +kern_return_t IOConnectCallStructMethod(io_connect_t client, + uint32_t selector, + const void* inStruct, + size_t inStructCnt, + void* outStruct, + size_t* outStructCnt); +kern_return_t IOConnectCallAsyncMethod(io_connect_t client, + uint32_t selector, + mach_port_t wake_port, + uint64_t* ref, + uint32_t refCnt, + const uint64_t* in, + uint32_t inCnt, + const void* inStruct, + size_t inStructCnt, + uint64_t* out, + uint32_t* outCnt, + void* outStruct, + size_t* outStructCnt); +kern_return_t IOConnectCallAsyncScalarMethod(io_connect_t client, + uint32_t selector, + mach_port_t wake_port, + uint64_t* ref, + uint32_t refCnt, + const uint64_t* in, + uint32_t inCnt, + uint64_t* out, + uint32_t* outCnt); +kern_return_t IOConnectCallAsyncStructMethod(io_connect_t client, + uint32_t selector, + mach_port_t wake_port, + uint64_t* ref, + uint32_t refCnt, + const void* inStruct, + size_t inStructCnt, + void* outStruct, + size_t* outStructCnt); +kern_return_t IOConnectTrap6(io_connect_t client, + uint32_t index, + uintptr_t a, + uintptr_t b, + uintptr_t c, + uintptr_t d, + uintptr_t e, + uintptr_t f); + +#if __cplusplus +} +#endif // __cplusplus + +#endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_IOKIT_H_ +#endif // defined(FLUTTER_RUNTIME_MODE_DEBUG) || + // defined(FLUTTER_RUNTIME_MODE_PROFILE) diff --git a/shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.mm b/shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.mm index db223ff2fb387..271a51ab3ca6c 100644 --- a/shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.mm +++ b/shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.mm @@ -3,6 +3,8 @@ // found in the LICENSE file. #include "flutter/shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.h" +#import +#import "IOKit.h" namespace { @@ -28,9 +30,126 @@ } namespace flutter { +namespace { + +#if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG || \ + FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_PROFILE + +template +T ClearValue() { + return nullptr; +} + +template <> +io_object_t ClearValue() { + return 0; +} + +template +/// Generic RAII wrapper like unique_ptr but gives access to its handle. +class Scoped { + public: + typedef void (*Deleter)(T); + explicit Scoped(Deleter deleter) : object_(ClearValue()), deleter_(deleter) {} + Scoped(T object, Deleter deleter) : object_(object), deleter_(deleter) {} + ~Scoped() { + if (object_) { + deleter_(object_); + } + } + T* handle() { + if (object_) { + deleter_(object_); + object_ = ClearValue(); + } + return &object_; + } + T get() { return object_; } + void swap(T new_value) { + if (object_) { + deleter_(object_); + } + object_ = new_value; + } + + private: + FML_DISALLOW_COPY_ASSIGN_AND_MOVE(Scoped); + T object_; + Deleter deleter_; +}; + +void DeleteCF(CFMutableDictionaryRef value) { + CFRelease(value); +} + +void DeleteIO(io_object_t value) { + IOObjectRelease(value); +} + +std::optional FindGpuUsageInfo(io_iterator_t iterator) { + for (Scoped regEntry(IOIteratorNext(iterator), DeleteIO); regEntry.get(); + regEntry.swap(IOIteratorNext(iterator))) { + Scoped serviceDictionary(DeleteCF); + if (IORegistryEntryCreateCFProperties(regEntry.get(), serviceDictionary.handle(), + kCFAllocatorDefault, kNilOptions) != kIOReturnSuccess) { + continue; + } + + NSDictionary* dictionary = + ((__bridge NSDictionary*)serviceDictionary.get())[@"PerformanceStatistics"]; + NSNumber* utilization = dictionary[@"Device Utilization %"]; + if (utilization) { + return (GpuUsageInfo){.percent_usage = [utilization doubleValue]}; + } + } + return std::nullopt; +} + +[[maybe_unused]] std::optional FindSimulatorGpuUsageInfo() { + Scoped iterator(DeleteIO); + if (IOServiceGetMatchingServices(kIOMasterPortDefault, IOServiceNameMatching("IntelAccelerator"), + iterator.handle()) == kIOReturnSuccess) { + return FindGpuUsageInfo(iterator.get()); + } + return std::nullopt; +} + +[[maybe_unused]] std::optional FindDeviceGpuUsageInfo() { + Scoped iterator(DeleteIO); + if (IOServiceGetMatchingServices(kIOMasterPortDefault, IOServiceNameMatching("sgx"), + iterator.handle()) == kIOReturnSuccess) { + for (Scoped regEntry(IOIteratorNext(iterator.get()), DeleteIO); + regEntry.get(); regEntry.swap(IOIteratorNext(iterator.get()))) { + Scoped innerIterator(DeleteIO); + if (IORegistryEntryGetChildIterator(regEntry.get(), kIOServicePlane, + innerIterator.handle()) == kIOReturnSuccess) { + std::optional result = FindGpuUsageInfo(innerIterator.get()); + if (result.has_value()) { + return result; + } + } + } + } + return std::nullopt; +} + +#endif // FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG || + // FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_PROFILE + +std::optional PollGpuUsage() { +#if (FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_RELEASE || \ + FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_JIT_RELEASE) + return std::nullopt; +#elif TARGET_IPHONE_SIMULATOR + return FindSimulatorGpuUsageInfo(); +#elif TARGET_OS_IOS + return FindDeviceGpuUsageInfo(); +#endif // TARGET_IPHONE_SIMULATOR +} +} // namespace ProfileSample ProfilerMetricsIOS::GenerateSample() { - return {.cpu_usage = CpuUsage(), .memory_usage = MemoryUsage()}; + return {.cpu_usage = CpuUsage(), .memory_usage = MemoryUsage(), .gpu_usage = PollGpuUsage()}; } std::optional ProfilerMetricsIOS::CpuUsage() { diff --git a/shell/profiling/sampling_profiler.cc b/shell/profiling/sampling_profiler.cc index 1f5410fa8a12a..790d70f91ec4f 100644 --- a/shell/profiling/sampling_profiler.cc +++ b/shell/profiling/sampling_profiler.cc @@ -54,6 +54,12 @@ void SamplingProfiler::SampleRepeatedly(fml::TimeDelta task_delay) const { "owned_shared_memory_usage", owned_shared_memory_usage.c_str()); } + if (usage.gpu_usage) { + std::string gpu_usage = + std::to_string(usage.gpu_usage->percent_usage); + TRACE_EVENT_INSTANT1("flutter::profiling", "GpuUsage", "gpu_usage", + gpu_usage.c_str()); + } profiler->SampleRepeatedly(task_delay); }, task_delay); diff --git a/shell/profiling/sampling_profiler.h b/shell/profiling/sampling_profiler.h index 598443d037ac0..146454d3fc2ea 100644 --- a/shell/profiling/sampling_profiler.h +++ b/shell/profiling/sampling_profiler.h @@ -42,6 +42,13 @@ struct MemoryUsageInfo { double owned_shared_memory_usage; }; +/** + * @brief Polled information related to the usage of the GPU. + */ +struct GpuUsageInfo { + double percent_usage; +}; + /** * @brief Container for the metrics we collect during each run of `Sampler`. * This currently holds `CpuUsageInfo` and `MemoryUsageInfo` but the intent @@ -52,6 +59,7 @@ struct MemoryUsageInfo { struct ProfileSample { std::optional cpu_usage; std::optional memory_usage; + std::optional gpu_usage; }; /** From 46caef606718d0d53fa00169a182b239058d090f Mon Sep 17 00:00:00 2001 From: Aaron Clarke Date: Fri, 5 Jun 2020 10:27:35 -0700 Subject: [PATCH 2/4] responded to kaushiks feedback - added documentation - fixed method name --- shell/platform/darwin/ios/framework/Source/IOKit.h | 7 +++++++ .../darwin/ios/framework/Source/profiler_metrics_ios.mm | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/shell/platform/darwin/ios/framework/Source/IOKit.h b/shell/platform/darwin/ios/framework/Source/IOKit.h index e59dda944885f..8bc01a24ea251 100644 --- a/shell/platform/darwin/ios/framework/Source/IOKit.h +++ b/shell/platform/darwin/ios/framework/Source/IOKit.h @@ -2,6 +2,13 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +// These declarations are an amalgamation of different headers whose +// symbols exist in IOKit.framework. The headers have been removed +// from the iOS SDKs but all the functions are documented here: +// * https://developer.apple.com/documentation/iokit/iokitlib_h?language=objc +// * https://developer.apple.com/documentation/iokit/iokit_functions?language=objc +// * file:///Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks/IOKit.framework/Versions/A/Headers/IOKitLib.h + #if FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG || \ FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_PROFILE #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_FRAMEWORK_SOURCE_IOKIT_H_ diff --git a/shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.mm b/shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.mm index 271a51ab3ca6c..6433b15299ccf 100644 --- a/shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.mm +++ b/shell/platform/darwin/ios/framework/Source/profiler_metrics_ios.mm @@ -65,7 +65,7 @@ explicit Scoped(Deleter deleter) : object_(ClearValue()), deleter_(deleter) { return &object_; } T get() { return object_; } - void swap(T new_value) { + void reset(T new_value) { if (object_) { deleter_(object_); } @@ -88,7 +88,7 @@ void DeleteIO(io_object_t value) { std::optional FindGpuUsageInfo(io_iterator_t iterator) { for (Scoped regEntry(IOIteratorNext(iterator), DeleteIO); regEntry.get(); - regEntry.swap(IOIteratorNext(iterator))) { + regEntry.reset(IOIteratorNext(iterator))) { Scoped serviceDictionary(DeleteCF); if (IORegistryEntryCreateCFProperties(regEntry.get(), serviceDictionary.handle(), kCFAllocatorDefault, kNilOptions) != kIOReturnSuccess) { @@ -119,7 +119,7 @@ void DeleteIO(io_object_t value) { if (IOServiceGetMatchingServices(kIOMasterPortDefault, IOServiceNameMatching("sgx"), iterator.handle()) == kIOReturnSuccess) { for (Scoped regEntry(IOIteratorNext(iterator.get()), DeleteIO); - regEntry.get(); regEntry.swap(IOIteratorNext(iterator.get()))) { + regEntry.get(); regEntry.reset(IOIteratorNext(iterator.get()))) { Scoped innerIterator(DeleteIO); if (IORegistryEntryGetChildIterator(regEntry.get(), kIOServicePlane, innerIterator.handle()) == kIOReturnSuccess) { From a0c629ae5c59de4c62cf00cb828747b8cd4b937e Mon Sep 17 00:00:00 2001 From: Aaron Clarke Date: Wed, 10 Jun 2020 11:04:46 -0700 Subject: [PATCH 3/4] trimmed up iokit to minimal set required with annotations for where the defines come from --- .../darwin/ios/framework/Source/IOKit.h | 134 +----------------- 1 file changed, 3 insertions(+), 131 deletions(-) diff --git a/shell/platform/darwin/ios/framework/Source/IOKit.h b/shell/platform/darwin/ios/framework/Source/IOKit.h index 8bc01a24ea251..6f95655ca407c 100644 --- a/shell/platform/darwin/ios/framework/Source/IOKit.h +++ b/shell/platform/darwin/ios/framework/Source/IOKit.h @@ -22,59 +22,22 @@ extern "C" { #include #include +#define IOKIT +#include + static const char* kIOServicePlane = "IOService"; -typedef char io_name_t[128]; -typedef char io_string_t[512]; -typedef char io_struct_inband_t[4096]; -typedef mach_port_t io_object_t; typedef io_object_t io_registry_entry_t; typedef io_object_t io_service_t; typedef io_object_t io_connect_t; typedef io_object_t io_iterator_t; -enum { - kIOCFSerializeToBinary = 0x00000001U, -}; - enum { kIOReturnSuccess = 0, }; -enum { - kIORegistryIterateRecursively = 0x00000001U, - kIORegistryIterateParents = 0x00000002U, -}; - -enum { - kOSSerializeDictionary = 0x01000000U, - kOSSerializeArray = 0x02000000U, - kOSSerializeSet = 0x03000000U, - kOSSerializeNumber = 0x04000000U, - kOSSerializeSymbol = 0x08000000U, - kOSSerializeString = 0x09000000U, - kOSSerializeData = 0x0a000000U, - kOSSerializeBoolean = 0x0b000000U, - kOSSerializeObject = 0x0c000000U, - - kOSSerializeTypeMask = 0x7F000000U, - kOSSerializeDataMask = 0x00FFFFFFU, - - kOSSerializeEndCollection = 0x80000000U, - - kOSSerializeMagic = 0x000000d3U, -}; - extern const mach_port_t kIOMasterPortDefault; -CF_RETURNS_RETAINED CFDataRef IOCFSerialize(CFTypeRef object, - CFOptionFlags options); -CFTypeRef IOCFUnserializeWithSize(const char* buf, - size_t len, - CFAllocatorRef allocator, - CFOptionFlags options, - CFStringRef* err); - kern_return_t IOObjectRetain(io_object_t object); kern_return_t IOObjectRelease(io_object_t object); boolean_t IOObjectConformsTo(io_object_t object, const io_name_t name); @@ -135,97 +98,6 @@ kern_return_t IOServiceGetMatchingServices(mach_port_t master, CFDictionaryRef matching CF_RELEASES_ARGUMENT, io_iterator_t* it); -kern_return_t _IOServiceGetAuthorizationID(io_service_t service, - uint64_t* authID); -kern_return_t _IOServiceSetAuthorizationID(io_service_t service, - uint64_t authID); -kern_return_t IOServiceOpen(io_service_t service, - task_t task, - uint32_t type, - io_connect_t* client); -kern_return_t IOServiceClose(io_connect_t client); -kern_return_t IOCloseConnection(io_connect_t client); -kern_return_t IOConnectAddRef(io_connect_t client); -kern_return_t IOConnectRelease(io_connect_t client); -kern_return_t IOConnectGetService(io_connect_t client, io_service_t* service); -kern_return_t IOConnectAddClient(io_connect_t client, io_connect_t other); -kern_return_t IOConnectSetNotificationPort(io_connect_t client, - uint32_t type, - mach_port_t port, - uintptr_t ref); -kern_return_t IOConnectMapMemory64(io_connect_t client, - uint32_t type, - task_t task, - mach_vm_address_t* addr, - mach_vm_size_t* size, - uint32_t options); -kern_return_t IOConnectUnmapMemory64(io_connect_t client, - uint32_t type, - task_t task, - mach_vm_address_t addr); -kern_return_t IOConnectSetCFProperties(io_connect_t client, - CFTypeRef properties); -kern_return_t IOConnectCallMethod(io_connect_t client, - uint32_t selector, - const uint64_t* in, - uint32_t inCnt, - const void* inStruct, - size_t inStructCnt, - uint64_t* out, - uint32_t* outCnt, - void* outStruct, - size_t* outStructCnt); -kern_return_t IOConnectCallScalarMethod(io_connect_t client, - uint32_t selector, - const uint64_t* in, - uint32_t inCnt, - uint64_t* out, - uint32_t* outCnt); -kern_return_t IOConnectCallStructMethod(io_connect_t client, - uint32_t selector, - const void* inStruct, - size_t inStructCnt, - void* outStruct, - size_t* outStructCnt); -kern_return_t IOConnectCallAsyncMethod(io_connect_t client, - uint32_t selector, - mach_port_t wake_port, - uint64_t* ref, - uint32_t refCnt, - const uint64_t* in, - uint32_t inCnt, - const void* inStruct, - size_t inStructCnt, - uint64_t* out, - uint32_t* outCnt, - void* outStruct, - size_t* outStructCnt); -kern_return_t IOConnectCallAsyncScalarMethod(io_connect_t client, - uint32_t selector, - mach_port_t wake_port, - uint64_t* ref, - uint32_t refCnt, - const uint64_t* in, - uint32_t inCnt, - uint64_t* out, - uint32_t* outCnt); -kern_return_t IOConnectCallAsyncStructMethod(io_connect_t client, - uint32_t selector, - mach_port_t wake_port, - uint64_t* ref, - uint32_t refCnt, - const void* inStruct, - size_t inStructCnt, - void* outStruct, - size_t* outStructCnt); -kern_return_t IOConnectTrap6(io_connect_t client, - uint32_t index, - uintptr_t a, - uintptr_t b, - uintptr_t c, - uintptr_t d, - uintptr_t e, - uintptr_t f); #if __cplusplus } From 28b53f99d45f2add47fd7a4154239ef009db406f Mon Sep 17 00:00:00 2001 From: Aaron Clarke Date: Mon, 15 Jun 2020 10:33:43 -0700 Subject: [PATCH 4/4] updated licenses --- ci/licenses_golden/licenses_flutter | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/licenses_golden/licenses_flutter b/ci/licenses_golden/licenses_flutter index 07d1c4b73c346..728077a3de620 100755 --- a/ci/licenses_golden/licenses_flutter +++ b/ci/licenses_golden/licenses_flutter @@ -903,6 +903,7 @@ FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterView.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterViewControllerTest.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/FlutterViewController_Internal.h +FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/IOKit.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.h FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/SemanticsObject.mm FILE: ../../../flutter/shell/platform/darwin/ios/framework/Source/SemanticsObjectTest.mm