mirror of
https://github.com/apple/swift-nio.git
synced 2026-05-20 20:30:36 +00:00
5599bfe4c8
Motivation: dtrace is extrmely useful when debugging allocation related issues. This adds two scripts that have helped me many times. Modifications: - `dev/malloc-aggregation.d` which prints an aggregation of all stacks that have allocated - `dev/boxed-existentials.d` which live prints all allocations of boxed existentials Result: sharing debugging tools is great
24 lines
706 B
D
Executable File
24 lines
706 B
D
Executable File
#!/usr/sbin/dtrace -q -s
|
|
/*===----------------------------------------------------------------------===*
|
|
*
|
|
* This source file is part of the SwiftNIO open source project
|
|
*
|
|
* Copyright (c) 2017-2018 Apple Inc. and the SwiftNIO project authors
|
|
* Licensed under Apache License v2.0
|
|
*
|
|
* See LICENSE.txt for license information
|
|
* See CONTRIBUTORS.txt for the list of SwiftNIO project authors
|
|
*
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
*
|
|
*===----------------------------------------------------------------------===*/
|
|
|
|
/*
|
|
* example invocation:
|
|
* sudo dev/boxed-existentials.d -c .build/release/NIOHTTP1Server
|
|
*/
|
|
|
|
pid$target::__swift_allocate_boxed_opaque_existential*:entry {
|
|
ustack();
|
|
}
|