Home
last modified time | relevance | path

Searched refs:with (Results 1 – 25 of 195) sorted by relevance

12345678

/xnu-11215/doc/observability/
H A Drecount.md9 ARM64 devices with a fast timebase read and Intel devices can track time spent in the kernel (syste…
63 Coalition pointers can be found with the `showtaskcoalitions` macro, and should be _resource_ coali…
75 …tities like threads and tasks starts with a `recount_plan_t`, declared using `RECOUNT_PLAN_DECLARE…
80 - `ru_energy_nj`: the energy consumed by a CPU, in nano-Joules with `CONFIG_PERVASIVE_ENERGY`
82 The metrics are stored in a `recount_metrics` structure with the following fields:
85 - `ru_cycles`: the cycles run by a CPU with `CONFIG_PERVASIVE_CPI`
86 - `ru_instructions`: the instructions retired by a CPU with `CONFIG_PERVASIVE_CPI`
88 At context switch, `recount_switch_thread` captures the hardware counters with `recount_snapshot` i…
90 The per-CPU variable is then updated with the current snapshot for the next switch.
96 Processors also track their idle time separately from the usage structure with paired calls to `rec…
[all …]
H A Dmt_stackshot.md36 the scheduler and with interrupts disabled, it does not use "actual" threads to
48 finishes with its first queue, it will move on to the other.
62 size. Should the buffer be too small, stackshot will try again with a bigger
70 with space split evenly between each cluster. If a cluster runs out of buffer
91 have any extra room at the end of the current chunk once we finish with a task,
126 By default, tracepoints are only emitted when stackshot runs into an error (with
127 the error number as the data), but it's trivial to add more with the
131 easily, but for now, it can be examined in lldb with `showpcpu -V
137 before (with a single CPU/thread) - with the only difference being that we can
/xnu-11215/iokit/DriverKit/
H A DOSAction.iig9 * compliance with the License. The rights granted to you under the License
47 * State associated with the callback may be allocated and stored for the creator of the object.
48 * Methods to allocate an OSAction instance are generated for each method defined in a class with
49 …* a TYPE attribute. The generated methods are named CreateAction{name of method with type attribut…
55 …* with GetReference. If successful, the generated method returns kIOReturnSuccess and a created OS…
56 …* through the 'action' parameter with a +1 retain count to be released by the caller. See IOReturn…
67 …ion Methods to allocate an OSAction instance are generated for each method defined in a class with
75 * with GetReference.
76 * @param action Created OSAction with +1 retain count to be released by the caller.
103 * with this method.
[all …]
H A DIOEventLink.iig9 * compliance with the License. The rights granted to you under the License
64 * with os_eventlink_create() (see <os/eventlink_private.h>). The application then has to extract
65 …* the remote eventlink port with os_eventlink_extract_remote_port(). To send the remote eventlink …
76 …* Once the remote eventlink port has been sent to the driver, the driver should be notified with a…
77 …g signaling mechanism. The driver should handle this by activating the IOEventLink with Activate().
91 …* @param name User-specified name. If an IOEventLink with the same name already exists…
95 … * @param eventLink Created IOEventLink with +1 retain count to be released by the caller.
140 …* @brief Signal the eventlink and wait with a timeout. If a thread is waiting on the eventli…
151 …* @brief Wait with a timeout. If a thread is waiting on the eventlink, this will wake up tha…
178 * @brief Associate a thread with the eventlink.
[all …]
H A DIOWorkGroup.iig9 * compliance with the License. The rights granted to you under the License
50 * workgroup port with os_workgroup_copy_port(). To send the workgroup port to the driver, use:
60 …* Once the workgroup port has been sent to the driver, the driver should be notified with a user-d…
78 … * @param workgroup Created IOWorkGroup with +1 retain count to be released by the caller.
108 * a workgroup with Leave(), use the same token that was passed to Join().
117 …* @discussion The workgroup must have been joined with Join(). Use the same token in Join() for t…
127 …. This method should be called after the client has configured the eventlink with the IOConnectTrap
H A DIOBufferMemoryDescriptor.iig9 * compliance with the License. The rights granted to you under the License
61 * and zero length until set with SetLength().
62 * @param memory Created descriptor with +1 retain count to be released by the caller.
82 …* @param range An IOAddressSegment structure filled out with the address and length of the m…
91 * with this method.
H A DIODispatchQueue.iig9 * compliance with the License. The rights granted to you under the License
80 kIODispatchQueueReentrant Creates a queue that allows release with the Sleep
108 * @brief Return the name the queue was created with.
144 … * concurrently with other blocks executed with DispatchConcurrent. The queue will be
145 * retained until the block completes. May only be used with a queue created with
173 …* @brief Log the current execution context with respect to any queues the current thread hol…
219 * @discussion Signals a thread that gave up the queue with Sleep() to continue running.
229 * @discussion Signals a thread that gave up the queue with Sleep() to continue running.
H A DIODataQueueDispatchSource.iig9 * compliance with the License. The rights granted to you under the License
48 * @param source Created source with +1 retain count to be released by the caller.
125 … * @param callback to invoked if the queue is non-empty with the next entry to be dequeued.
135 * @param callback invoked if the queue was non-empty with the entry that was dequeued.
158 * and if true after those calls, the notification sent with SendDataServiced().
159 * @param callback invoked if the queue was non-empty with the entry that was dequeued.
172 * and if true after those calls, the notification sent with SendDataAvailable().
182 …a producer, check if the queue has sufficient free space for a queue entry with the specified size.
192 …a producer, check if the queue has sufficient free space for queue entries with the specified size.
H A DIODMACommand.iig9 * compliance with the License. The rights granted to you under the License
84 * IODMACommand does not perform bounce buffering but allows access to the mapping with
108 * @param command Returned IODMACommand object with +1 retain count.
172 the memory specified with the data param
174 the memory specified with the data param
178 * @param dataffset Offset into the memory specified with the data param
/xnu-11215/doc/debugging/
H A Ddebugging.md3 Debugging XNU through kernel core files or with a live device.
29 ### Dealing with binary data
46 with open(filepath, 'wb') as f:
57 with open(filepath, 'wb') as f:
126 ### Dealing with signed numbers
156 # 1. Run LLDB with debug options set
177 # 2. Grab symbols with dsymForUUID
203 Install **coverage** lib with:
309 ### Debugging with pdb
364 Lets try to look around with a debugger.
[all …]
H A Dmacro_testing.md3 How to work with bundled unit test framework.
15 **Standalone** unit tests replace _lldb_ and _lldbwrap_ modules with _MagicMock_
24 Standalone tests do not need LLDB and can be run with:
46 `unittest.mock` and cover specific needs with additional mocks provided by
/xnu-11215/tools/lldbmacros/
H A DREADME.md47 #for gdb (eg with astris)
81 | | |--lldb core--| | | <-- interacts with remote kernel or corefile.
94 …will show task summary output with lines matching string 'kernel_task' into a file /tmp/kernel_tas…
97 It will automatically register given types with the functions within the kernel category.
108 |-xnu.py # xnu debug framework along with kgmhelp, xnudebug commands.
288 - using a local variable with same name as global variable?
337 Detailed explanation if necessary along with params and return values.
353 …unction should always start with CAPITAL letter and be CamelCase. If a function is for internal us…
355 * Function params should always be lower_case and be word separated with '_'
357 * A local variable inside a function should be lower_case and separated with '_'
[all …]
/xnu-11215/doc/primitives/
H A Datomics.md15 as this document builds on it, and explains the liberties XNU takes with said
42 By default, C11 comes with two variants of each atomic "operation":
45 - a regular variant which is equivalent to the former with the *seq_cst*
59 optimizations with relaxed atomics, that most developers will not expect.
107 3. `os_atomic_*` only comes with the explicit variants:
132 Qualifying atomic variables with `_Atomic` or even
151 with an optional barrier ordering. It is implemented with C11's
345 - loads through a pointer loaded with a *dependency* memory ordering
349 particular pointer with the `os_atomic_load_with_dependency_on` and
398 There are 4 interfaces involved with hardware dependencies:
[all …]
H A Dstring-handling.md9 intersection with the -fbounds-safety C extension.
22 `strncmp` is always wrong with -fbounds-safety, and it's unavailable as a
31 Using `strncmp` with two NUL-terminated strings is uncommon and it has no
43 # The problems with string functions
71 terminated string. Because of coexistence with `strn` functions that make no
87 # Changes with -fbounds-safety
91 prevents confusing the two in the way that is problematic with `strlcpy`, for
101 -fbounds-safety and XNU enshrine this practice with the following additions:
190 `tsnprintf` or `strbufcpy` once. As a quick reference, with -fbounds-safety
195 build a string with successive calls to `scnprintf`, you would use
[all …]
/xnu-11215/bsd/crypto/doc/
H A DKernelCrypto.txt9 * The implementation was written so as to conform with Netscapes SSL.
15 * included with this distribution is covered by the same copyright terms
23 * in documentation (online or textual) provided with the package.
25 * Redistribution and use in source and binary forms, with or without
32 * documentation and/or other materials provided with the distribution.
70 form is allowed (with or without changes) provided that:
88 This software is provided 'as is' with no explicit or implied warranties
100 form is allowed (with or without changes) provided that:
118 This software is provided 'as is' with no explicit or implied warranties
131 The free distribution and use of this software is allowed (with or without
[all …]
/xnu-11215/libkdd/kdd.xcodeproj/
H A Dproject.pbxproj25 …7C00B4808B /* stackshot-with-waitinfo in Resources */ = {isa = PBXBuildFile; fileRef = 04C64AC91D2…
86 …C5D600FFC181 /* stackshot-with-kcid in Resources */ = {isa = PBXBuildFile; fileRef = 13A79CA81CF8C…
181 …stackshot-with-waitinfo */ = {isa = PBXFileReference; lastKnownFileType = file; name = "stackshot-…
182 …with-waitinfo.plist.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; name = "sta…
241 … /* stackshot-with-kcid */ = {isa = PBXFileReference; lastKnownFileType = file; name = "stackshot-…
242 …-with-kcid.plist.gz */ = {isa = PBXFileReference; lastKnownFileType = archive.gzip; name = "stacks…
338 D66E8CF72683E87D009AF15F /* stackshot-with-asyncinfo */,
366 04C64AC91D25C43400C6C781 /* stackshot-with-waitinfo */,
368 13A79CA81CF8C5D200FFC181 /* stackshot-with-kcid */,
1008 DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
[all …]
/xnu-11215/doc/allocators/
H A Dapi-basics.md9 - the VM subsystem that provides allocations at the granularity of pages (with
66 interfaces with a size smaller than `KALLOC_SAFE_ALLOC_SIZE`,
83 from other types (typically `zone_require` will be used with this zone),
117 types or structure members can be decorated with `__kernel_ptr_semantics`
139 These come in two variants: arrays, and arrays prefixed with a header.
151 If those rules can't be followed, then the allocation must be split with
157 When allocating untyped memory with the data APIs ensure that it doesn't
272 -fbounds-safety and pointers with __counted_by and __sized_by modifiers,
286 Most, if not all, C++ objects used in conjuction with IOKit APIs
332 their implementation, you can use `IODeclareTypedOperators` paired with
[all …]
/xnu-11215/tests/iokit/
H A Dio_catalog_send_data.m102 "build an IORegistry entry with mismatching IOService and "
117 "return success with development kernel");
120 T_EXPECT_EQ(kret, kIOReturnNotPrivileged, "build an entry with"
126 "IOCatalogueSendData should return success with kernelmanagerd");
/xnu-11215/doc/vm/
H A Dmemorystatus_kills.md45 …empt to fix this by hopefully killing whatever higher band process is talking with the idle daemon.
53 …with `POSIX_SPAWN_JETSAM_RELAUNCH_BEHAVIOR_HIGH`, if the majority of durations are in bucket 2 the…
55 …on gets in the aging band. This is currently band 10 for daemons. Daemons with high relaunch likel…
61 In this case the `memorystatus_thread` kills the process with the lowest jetsam priority and resets…
71 This only happens on platforms with `CONFIG_FREEZE`. Currently this is just iOS. When the system is…
72 Since frozen processes can be in any band <= foreground, we scan the bands for procs with the `P_ME…
84 …us_thread` to pick and kill a process. Memorystatus will kill the process with the lowest jetsam p…
88 …sions in the last 10 m.s. The `memorystatus_thread` will kill the process with the lowest jetsam p…
90 NB: These thresholds are very old and have probably not scaled well with current hardware. Accordin…
H A Dsanitize.md13 overflow. Note that these APIs are meant to primarily catch issues with
154 - Associate the safe type with its unsafe type using `VM_UNSAFE_TYPE` or
160 headers that are generated by MIG, but overload with the unsafe type
167 replaces `pointer_t` with `vm_offset_t` in userspace headers
236 writing new ones with specific purposes. `vm_sanitize.c` is meant to
242 - Mark function with `__attribute__((always_inline,
294 A test `harness` or `runner` is the loop that runs a VM function with
296 These function names start with `test_`. For example,
383 runner with that setup and those trials. The test runner loops through
386 to be tested. If there is an existing VM API with similar setup or
[all …]
/xnu-11215/libkdd/
H A DREADME.md43 …s reserved for special types like ints, longs etc. A cool new functionality made possible with this
47 Feature description: Generic data with description
49 Further more generic data with description is very much possible now. For example
54 … look at the description and print the data even if they are not compiled with knowledge of the fi…
75 For example, the stackshot code gathers information and describes the state of a given task with re…
/xnu-11215/doc/building/
H A Dbound_checks.md17 Whether a given file builds with -fbounds-safety is controlled by the build
99 * one pull request with the necessary adoption code changes, configuring the
100 file to build with `bound-checks-pending`;
108 The configuration status quo of any file in xnu is to build with no options
112 ABI-compatible with plain C: if they were defined to nothing instead, and a use
123 compatible with -fbounds-safety (such as -Wself-assign). This allows files that
124 are compatible with -fbounds-safety to continue to build without it, while
135 panicking. Kernels with known soft trap triggers are un-shippable, but they may
149 non-trivial code changes with the enablement of -fbounds-safety is a recipe for
164 We let changes with `bound-checks-soft` steep in internal releases to build up
[all …]
/xnu-11215/tools/tests/MPMMTest/
H A DREADME3 These tests measure the speed of IPC with mach messaging and kqueues. To build,
14 variables with command line options--run './MPMMtest -h' for details.
/xnu-11215/
H A DAPPLE_LICENSE24 Modifications, taken alone or in combination with Original Code.
38 with a client other than You.
41 thereof with code not governed by the terms of this License.
69 common control with, You, where "control" means (a) the power, direct
158 Code with other code not governed by the terms of this License and
171 rights consistent with the scope of the license granted herein
289 in technical data and software is provided in accordance with FAR
306 same or similar functions as, or otherwise compete with,
323 specifically complying with Sections 2 and/or 3 or prevents the
333 courts within that District with respect to this License. The
[all …]
/xnu-11215/osfmk/mach/
H A Dmach_port.defs83 * to which the target task has access, along with
116 * Allocates the specified kind of object, with the given name.
139 * It can use any name not associated with a right.
148 * Destroys all rights associated with the name and makes it
150 * port (possibly with multiple user refs), a port set, or
151 * a dead name (again, with multiple user refs).
213 * right and return info about the message with the
221 * or'ed with one of these element types:
294 * (with MACH_SEND_NOTIFY option to mach_msg call). Can
388 * It can use any name not associated with a right.
[all …]

12345678