Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c04a148518 | ||
|
|
103e441e27 | ||
|
|
911feb609b | ||
|
|
c7be11d4e0 | ||
|
|
146477a850 | ||
|
|
d36c3a5442 | ||
|
|
e468c60229 | ||
|
|
d69f3d0eec | ||
|
|
25f671e9d8 | ||
|
|
0121cf9342 | ||
|
|
68fd88ceaf | ||
|
|
a6d700194f |
+1
-1
@@ -3,4 +3,4 @@ node_modules
|
||||
dist
|
||||
.idea
|
||||
coverage
|
||||
.vscode
|
||||
.vscode
|
||||
@@ -1,3 +1,21 @@
|
||||
## [1.21.2] - 2025-01-15
|
||||
|
||||
- Switch from parcel to esbuild [[#432](https://github.com/jlfwong/speedscope/pull/432)] (by @jlfwong)
|
||||
- Revert "Upgrade to parcel 2.13.3" [[#492](https://github.com/jlfwong/speedscope/pull/492)] (by @jlfwong)
|
||||
- Upgrade to parcel 2.13.3 [[#492](https://github.com/jlfwong/speedscope/pull/492)] (by @jlfwong)
|
||||
- Add link to async-profiler wiki page to README
|
||||
|
||||
## [1.21.0] - 2024-11-16
|
||||
|
||||
- Add support for Instruments 16 Time Profile Deep Copy [[#484](https://github.com/jlfwong/speedscope/pull/484)] (by @robert3005)
|
||||
- Fix bug where import after error continues failing [[#463](https://github.com/jlfwong/speedscope/pull/463)] (by @tom93)
|
||||
- Bundle the font [[#472](https://github.com/jlfwong/speedscope/pull/472)] (by @Krinkle)
|
||||
- Clarify specification of startValue in speedscope file format [[#464](https://github.com/jlfwong/speedscope/pull/464)] (by @tom93)
|
||||
|
||||
## [1.20.0] - 2024-01-12
|
||||
|
||||
- Partition based on samples instead of traceEvents when importing a sample-based chrome trace [[#460](https://github.com/jlfwong/speedscope/pull/460)] (by @zacharyfmarion)
|
||||
|
||||
## [1.19.0] - 2023-12-27
|
||||
|
||||
- Improve hermes profile frame keys to better group frames [[#459](https://github.com/jlfwong/speedscope/pull/459)] (by @zacharyfmarion)
|
||||
|
||||
@@ -34,6 +34,9 @@ speedscope is designed to ingest profiles from a variety of different profilers
|
||||
- [Importing from pprof](https://github.com/jlfwong/speedscope/wiki/Importing-from-pprof-(go))
|
||||
- Rust
|
||||
- [flamescope](https://github.com/coolreader18/flamescope)
|
||||
- Java
|
||||
- [Importing from async‐profiler (Java)
|
||||
](https://github.com/jlfwong/speedscope/wiki/Importing-from-async%E2%80%90profiler-(Java))
|
||||
- Native code
|
||||
- [Importing from Instruments.app](https://github.com/jlfwong/speedscope/wiki/Importing-from-Instruments.app) (macOS)
|
||||
- [Importing from `perf`](https://github.com/jlfwong/speedscope/wiki/Importing-from-perf-(linux)) (linux)
|
||||
|
||||
@@ -1,172 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>speedscope</title>
|
||||
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet">
|
||||
<script>
|
||||
// https://github.com/evanw/webgl-recorder
|
||||
false && (function () {
|
||||
var getContext = HTMLCanvasElement.prototype.getContext;
|
||||
var requestAnimationFrame = window.requestAnimationFrame;
|
||||
var frameSincePageLoad = 0;
|
||||
|
||||
function countFrames() {
|
||||
frameSincePageLoad++;
|
||||
requestAnimationFrame(countFrames);
|
||||
}
|
||||
|
||||
window.requestAnimationFrame = function () {
|
||||
return requestAnimationFrame.apply(window, arguments);
|
||||
};
|
||||
|
||||
HTMLCanvasElement.prototype.getContext = function (type) {
|
||||
var canvas = this;
|
||||
var context = getContext.apply(canvas, arguments);
|
||||
|
||||
if (type === 'webgl' || type === 'experimental-webgl') {
|
||||
var oldWidth = canvas.width;
|
||||
var oldHeight = canvas.height;
|
||||
var oldFrameCount = frameSincePageLoad;
|
||||
var trace = [];
|
||||
var variables = {};
|
||||
var fakeContext = {
|
||||
trace: trace,
|
||||
compileTrace: compileTrace,
|
||||
downloadTrace: downloadTrace,
|
||||
};
|
||||
|
||||
trace.push(' gl.canvas.width = ' + oldWidth + ';');
|
||||
trace.push(' gl.canvas.height = ' + oldHeight + ';');
|
||||
|
||||
function compileTrace() {
|
||||
var text = 'function* render(gl) {\n';
|
||||
text += ' // Recorded using https://github.com/evanw/webgl-recorder\n';
|
||||
for (var key in variables) {
|
||||
text += ' var ' + key + 's = [];\n';
|
||||
}
|
||||
text += trace.join('\n');
|
||||
text += '\n}\n';
|
||||
return text;
|
||||
}
|
||||
|
||||
function downloadTrace() {
|
||||
var text = compileTrace();
|
||||
var link = document.createElement('a');
|
||||
link.href = URL.createObjectURL(new Blob([text], { type: 'application/javascript' }));
|
||||
link.download = 'trace.js';
|
||||
document.body.appendChild(link);
|
||||
link.click();
|
||||
document.body.removeChild(link);
|
||||
}
|
||||
|
||||
function getVariable(value) {
|
||||
if (value instanceof WebGLActiveInfo ||
|
||||
value instanceof WebGLBuffer ||
|
||||
value instanceof WebGLFramebuffer ||
|
||||
value instanceof WebGLProgram ||
|
||||
value instanceof WebGLRenderbuffer ||
|
||||
value instanceof WebGLShader ||
|
||||
value instanceof WebGLShaderPrecisionFormat ||
|
||||
value instanceof WebGLTexture ||
|
||||
value instanceof WebGLUniformLocation) {
|
||||
var name = value.constructor.name;
|
||||
var list = variables[name] || (variables[name] = []);
|
||||
var index = list.indexOf(value);
|
||||
|
||||
if (index === -1) {
|
||||
index = list.length;
|
||||
list.push(value);
|
||||
}
|
||||
|
||||
return name + 's[' + index + ']';
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
console.timeStamp('start')
|
||||
var start = performance.now()
|
||||
for (var key in context) {
|
||||
var value = context[key];
|
||||
|
||||
if (typeof value === 'function') {
|
||||
fakeContext[key] = function (key, value) {
|
||||
return function () {
|
||||
trace.push(`// ${performance.now() - start}`)
|
||||
var result = value.apply(context, arguments);
|
||||
var args = [];
|
||||
|
||||
if (frameSincePageLoad !== oldFrameCount) {
|
||||
oldFrameCount = frameSincePageLoad;
|
||||
trace.push(' yield;');
|
||||
}
|
||||
|
||||
if (canvas.width !== oldWidth || canvas.height !== oldHeight) {
|
||||
oldWidth = canvas.width;
|
||||
oldHeight = canvas.height;
|
||||
trace.push(' gl.canvas.width = ' + oldWidth + ';');
|
||||
trace.push(' gl.canvas.height = ' + oldHeight + ';');
|
||||
}
|
||||
|
||||
for (var i = 0; i < arguments.length; i++) {
|
||||
var arg = arguments[i];
|
||||
|
||||
if (typeof arg === 'number' || typeof arg === 'boolean' || typeof arg === 'string' || arg === null) {
|
||||
args.push(JSON.stringify(arg));
|
||||
}
|
||||
|
||||
else if (ArrayBuffer.isView(arg)) {
|
||||
args.push('new ' + arg.constructor.name + '([' + Array.prototype.slice.call(arg) + '])');
|
||||
}
|
||||
|
||||
else {
|
||||
var variable = getVariable(arg);
|
||||
if (variable !== null) {
|
||||
args.push(variable);
|
||||
}
|
||||
|
||||
else {
|
||||
console.log('unsupported value:', arg);
|
||||
args.push('null');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var text = 'gl.' + key + '(' + args.join(', ') + ');';
|
||||
var variable = getVariable(result);
|
||||
if (variable !== null) text = variable + ' = ' + text;
|
||||
trace.push(' ' + text);
|
||||
|
||||
return result;
|
||||
};
|
||||
}(key, value);
|
||||
}
|
||||
|
||||
else {
|
||||
fakeContext[key] = value;
|
||||
}
|
||||
}
|
||||
|
||||
return fakeContext;
|
||||
}
|
||||
|
||||
return context;
|
||||
};
|
||||
|
||||
countFrames();
|
||||
})();
|
||||
</script>
|
||||
<link rel="stylesheet" href="reset.css">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="favicon-16x16.png">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script src="../src/speedscope.tsx"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,7 @@
|
||||
@font-face{
|
||||
font-family: 'Source Code Pro';
|
||||
font-weight: 400;
|
||||
font-style: normal;
|
||||
font-stretch: normal;
|
||||
src: url('./source-code-pro/SourceCodePro-Regular.ttf.woff2') format('woff2');
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
Copyright 2010-2019 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries.
|
||||
|
||||
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
||||
|
||||
This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL
|
||||
|
||||
|
||||
-----------------------------------------------------------
|
||||
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
||||
-----------------------------------------------------------
|
||||
|
||||
PREAMBLE
|
||||
The goals of the Open Font License (OFL) are to stimulate worldwide
|
||||
development of collaborative font projects, to support the font creation
|
||||
efforts of academic and linguistic communities, and to provide a free and
|
||||
open framework in which fonts may be shared and improved in partnership
|
||||
with others.
|
||||
|
||||
The OFL allows the licensed fonts to be used, studied, modified and
|
||||
redistributed freely as long as they are not sold by themselves. The
|
||||
fonts, including any derivative works, can be bundled, embedded,
|
||||
redistributed and/or sold with any software provided that any reserved
|
||||
names are not used by derivative works. The fonts and derivatives,
|
||||
however, cannot be released under any other type of license. The
|
||||
requirement for fonts to remain under this license does not apply
|
||||
to any document created using the fonts or their derivatives.
|
||||
|
||||
DEFINITIONS
|
||||
"Font Software" refers to the set of files released by the Copyright
|
||||
Holder(s) under this license and clearly marked as such. This may
|
||||
include source files, build scripts and documentation.
|
||||
|
||||
"Reserved Font Name" refers to any names specified as such after the
|
||||
copyright statement(s).
|
||||
|
||||
"Original Version" refers to the collection of Font Software components as
|
||||
distributed by the Copyright Holder(s).
|
||||
|
||||
"Modified Version" refers to any derivative made by adding to, deleting,
|
||||
or substituting -- in part or in whole -- any of the components of the
|
||||
Original Version, by changing formats or by porting the Font Software to a
|
||||
new environment.
|
||||
|
||||
"Author" refers to any designer, engineer, programmer, technical
|
||||
writer or other person who contributed to the Font Software.
|
||||
|
||||
PERMISSION & CONDITIONS
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
||||
redistribute, and sell modified and unmodified copies of the Font
|
||||
Software, subject to the following conditions:
|
||||
|
||||
1) Neither the Font Software nor any of its individual components,
|
||||
in Original or Modified Versions, may be sold by itself.
|
||||
|
||||
2) Original or Modified Versions of the Font Software may be bundled,
|
||||
redistributed and/or sold with any software, provided that each copy
|
||||
contains the above copyright notice and this license. These can be
|
||||
included either as stand-alone text files, human-readable headers or
|
||||
in the appropriate machine-readable metadata fields within text or
|
||||
binary files as long as those fields can be easily viewed by the user.
|
||||
|
||||
3) No Modified Version of the Font Software may use the Reserved Font
|
||||
Name(s) unless explicit written permission is granted by the corresponding
|
||||
Copyright Holder. This restriction only applies to the primary font name as
|
||||
presented to the users.
|
||||
|
||||
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
||||
Software shall not be used to promote, endorse or advertise any
|
||||
Modified Version, except to acknowledge the contribution(s) of the
|
||||
Copyright Holder(s) and the Author(s) or with their explicit written
|
||||
permission.
|
||||
|
||||
5) The Font Software, modified or unmodified, in part or in whole,
|
||||
must be distributed entirely under this license, and must not be
|
||||
distributed under any other license. The requirement for fonts to
|
||||
remain under this license does not apply to any document created
|
||||
using the Font Software.
|
||||
|
||||
TERMINATION
|
||||
This license becomes null and void if any of the above conditions are
|
||||
not met.
|
||||
|
||||
DISCLAIMER
|
||||
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
||||
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
||||
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
||||
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
||||
OTHER DEALINGS IN THE FONT SOFTWARE.
|
||||
Binary file not shown.
Generated
+1418
-11328
File diff suppressed because it is too large
Load Diff
+5
-4
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "speedscope",
|
||||
"version": "1.19.0",
|
||||
"version": "1.21.2",
|
||||
"description": "",
|
||||
"repository": "jlfwong/speedscope",
|
||||
"main": "index.js",
|
||||
@@ -9,14 +9,14 @@
|
||||
},
|
||||
"scripts": {
|
||||
"deploy": "./scripts/deploy.sh",
|
||||
"prepack": "./scripts/build-release.sh",
|
||||
"prepack": "./scripts/prepack.sh --outdir \"$(pwd)/dist/release\" --protocol file",
|
||||
"prettier": "prettier --write 'src/**/*.ts' 'src/**/*.tsx'",
|
||||
"lint": "eslint 'src/**/*.ts' 'src/**/*.tsx'",
|
||||
"jest": "./scripts/test-setup.sh && jest --runInBand",
|
||||
"coverage": "npm run jest -- --coverage",
|
||||
"typecheck": "tsc --noEmit",
|
||||
"test": "./scripts/ci.sh",
|
||||
"serve": "parcel assets/index.html --open --no-autoinstall"
|
||||
"serve": "tsx scripts/dev-server.ts"
|
||||
},
|
||||
"files": [
|
||||
"bin/cli.js",
|
||||
@@ -38,6 +38,7 @@
|
||||
"@typescript-eslint/parser": "6.16.0",
|
||||
"acorn": "7.2.0",
|
||||
"aphrodite": "2.1.0",
|
||||
"esbuild": "0.24.2",
|
||||
"eslint": "8.0.0",
|
||||
"eslint-plugin-prettier": "5.1.2",
|
||||
"eslint-plugin-react-hooks": "4.6.0",
|
||||
@@ -45,12 +46,12 @@
|
||||
"jsverify": "0.8.3",
|
||||
"jszip": "3.1.5",
|
||||
"pako": "1.0.6",
|
||||
"parcel-bundler": "1.12.4",
|
||||
"preact": "10.4.1",
|
||||
"prettier": "3.1.1",
|
||||
"protobufjs": "6.8.8",
|
||||
"source-map": "0.6.1",
|
||||
"ts-jest": "24.3.0",
|
||||
"tsx": "4.19.2",
|
||||
"typescript": "5.3.3",
|
||||
"typescript-json-schema": "0.42.0",
|
||||
"uglify-es": "3.2.2",
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
Weight Self Weight Symbol Names
|
||||
4.93 s 100.0% 0 s start
|
||||
4.93 s 99.9% 0 s main
|
||||
2.45 s 0.0% 846.00 ms delta()
|
||||
797.00 ms 0.0% 786.00 ms alpha()
|
||||
9.00 ms 0.0% 0 s leakMemory()
|
||||
8.00 ms 0.0% 1.00 ms szone_malloc_should_clear
|
||||
6.00 ms 0.0% 4.00 ms small_malloc_should_clear
|
||||
2.00 ms 0.0% 2.00 ms small_malloc_from_free_list
|
||||
1.00 ms 0.0% 1.00 ms small_malloc_from_free_list
|
||||
1.00 ms 0.0% 1.00 ms _malloc_zone_malloc
|
||||
2.00 ms 0.0% 2.00 ms _malloc_zone_malloc
|
||||
795.00 ms 0.0% 778.00 ms beta()
|
||||
14.00 ms 0.0% 1.00 ms leakMemory()
|
||||
11.00 ms 0.0% 2.00 ms szone_malloc_should_clear
|
||||
9.00 ms 0.0% 3.00 ms small_malloc_should_clear
|
||||
5.00 ms 0.0% 5.00 ms small_malloc_from_free_list
|
||||
1.00 ms 0.0% 1.00 ms rack_get_thread_index
|
||||
1.00 ms 0.0% 1.00 ms nanov2_malloc_type
|
||||
1.00 ms 0.0% 1.00 ms DYLD-STUB$$malloc
|
||||
2.00 ms 0.0% 2.00 ms nanov2_malloc_type
|
||||
1.00 ms 0.0% 1.00 ms _malloc_zone_malloc
|
||||
10.00 ms 0.0% 0 s leakMemory()
|
||||
7.00 ms 0.0% 3.00 ms szone_malloc_should_clear
|
||||
4.00 ms 0.0% 3.00 ms small_malloc_should_clear
|
||||
1.00 ms 0.0% 0 s mvm_allocate_pages_plat
|
||||
1.00 ms 0.0% 1.00 ms _kernelrpc_mach_vm_map_trap
|
||||
2.00 ms 0.0% 2.00 ms small_malloc_should_clear
|
||||
1.00 ms 0.0% 1.00 ms _malloc_zone_malloc
|
||||
3.00 ms 0.0% 3.00 ms _malloc_zone_malloc
|
||||
838.00 ms 0.0% 827.00 ms gamma()
|
||||
9.00 ms 0.0% 1.00 ms leakMemory()
|
||||
5.00 ms 0.0% 0 s szone_malloc_should_clear
|
||||
4.00 ms 0.0% 1.00 ms small_malloc_should_clear
|
||||
3.00 ms 0.0% 3.00 ms small_malloc_from_free_list
|
||||
1.00 ms 0.0% 1.00 ms rack_get_thread_index
|
||||
1.00 ms 0.0% 1.00 ms small_malloc_should_clear
|
||||
1.00 ms 0.0% 1.00 ms _malloc_zone_malloc
|
||||
1.00 ms 0.0% 1.00 ms nanov2_malloc_type
|
||||
2.00 ms 0.0% 2.00 ms _malloc_zone_malloc
|
||||
834.00 ms 0.0% 824.00 ms beta()
|
||||
9.00 ms 0.0% 0 s leakMemory()
|
||||
7.00 ms 0.0% 0 s szone_malloc_should_clear
|
||||
6.00 ms 0.0% 1.00 ms small_malloc_should_clear
|
||||
4.00 ms 0.0% 4.00 ms small_malloc_from_free_list
|
||||
1.00 ms 0.0% 1.00 ms rack_get_thread_index
|
||||
1.00 ms 0.0% 1.00 ms rack_get_thread_index
|
||||
1.00 ms 0.0% 1.00 ms nanov2_malloc_type
|
||||
1.00 ms 0.0% 1.00 ms small_malloc_should_clear
|
||||
1.00 ms 0.0% 1.00 ms _malloc_zone_malloc
|
||||
803.00 ms 0.0% 788.00 ms alpha()
|
||||
14.00 ms 0.0% 0 s leakMemory()
|
||||
11.00 ms 0.0% 1.00 ms szone_malloc_should_clear
|
||||
10.00 ms 0.0% 3.00 ms small_malloc_should_clear
|
||||
5.00 ms 0.0% 5.00 ms small_malloc_from_free_list
|
||||
2.00 ms 0.0% 2.00 ms rack_get_thread_index
|
||||
1.00 ms 0.0% 1.00 ms nanov2_malloc_type
|
||||
1.00 ms 0.0% 1.00 ms small_malloc_should_clear
|
||||
1.00 ms 0.0% 1.00 ms _malloc_zone_malloc
|
||||
1.00 ms 0.0% 1.00 ms _malloc_zone_malloc
|
||||
4.00 ms 0.1% 0 s dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const
|
||||
4.00 ms 0.1% 0 s dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)
|
||||
3.00 ms 0.0% 0 s dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&)
|
||||
3.00 ms 0.0% 0 s mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const
|
||||
3.00 ms 0.0% 0 s mach_o::Header::forEachLoadCommand(void (load_command const*, bool&) block_pointer) const
|
||||
3.00 ms 0.0% 0 s invocation function for block in mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const
|
||||
3.00 ms 0.0% 0 s invocation function for block in dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&)
|
||||
3.00 ms 0.0% 0 s dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&)
|
||||
3.00 ms 0.0% 0 s dyld4::Loader::forEachPath(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer)
|
||||
3.00 ms 0.0% 0 s dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const
|
||||
3.00 ms 0.0% 0 s dyld4::Loader::forEachResolvedAtPathVar(dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, dyld4::ProcessConfig::PathOverrides::Type, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer)
|
||||
3.00 ms 0.0% 0 s invocation function for block in dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&)
|
||||
3.00 ms 0.0% 0 s dyld4::Loader::makeDyldCacheLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, unsigned int, mach_o::Layout const*)
|
||||
3.00 ms 0.0% 0 s dyld4::RuntimeState::findPrebuiltLoader(char const*) const
|
||||
3.00 ms 0.0% 0 s dyld4::PrebuiltLoader::isValid(dyld4::RuntimeState const&) const
|
||||
3.00 ms 0.0% 0 s dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const
|
||||
3.00 ms 0.0% 0 s dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const
|
||||
3.00 ms 0.0% 0 s invocation function for block in dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const
|
||||
3.00 ms 0.0% 0 s dyld4::SyscallDelegate::fileExists(char const*, dyld4::FileID*, int*) const
|
||||
3.00 ms 0.0% 0 s dyld3::stat(char const*, stat*)
|
||||
3.00 ms 0.0% 3.00 ms stat
|
||||
1.00 ms 0.0% 0 s dyld4::APIs::runAllInitializersForMain()
|
||||
1.00 ms 0.0% 0 s dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const
|
||||
1.00 ms 0.0% 0 s dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const
|
||||
1.00 ms 0.0% 0 s dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const
|
||||
1.00 ms 0.0% 0 s dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const
|
||||
1.00 ms 0.0% 0 s dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const
|
||||
1.00 ms 0.0% 0 s dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const
|
||||
1.00 ms 0.0% 0 s dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const
|
||||
1.00 ms 0.0% 0 s dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const
|
||||
1.00 ms 0.0% 0 s dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const
|
||||
1.00 ms 0.0% 0 s dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const
|
||||
1.00 ms 0.0% 0 s invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const
|
||||
1.00 ms 0.0% 0 s invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const
|
||||
1.00 ms 0.0% 1.00 ms _GLOBAL__sub_I_stdlib_typed_new.cpp
|
||||
@@ -21,16 +21,6 @@
|
||||
"args": {
|
||||
"name": "mqt_js"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "mqt_js",
|
||||
"cat": "mqt_js",
|
||||
"ph": "X",
|
||||
"dur": 0,
|
||||
"pid": 7512,
|
||||
"ts": "11550183666",
|
||||
"tid": "7695",
|
||||
"args": {}
|
||||
}
|
||||
],
|
||||
"samples": [
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
OUTDIR=`pwd`/dist/release
|
||||
|
||||
# Typecheck
|
||||
node_modules/.bin/tsc --noEmit
|
||||
|
||||
# Run unit tests
|
||||
npm run jest
|
||||
|
||||
# Clean out the release directory
|
||||
rm -rf "$OUTDIR"
|
||||
mkdir -p "$OUTDIR"
|
||||
|
||||
# Place info about the current commit into the build dir to easily identify releases
|
||||
npm ls -depth -1 | head -n 1 | cut -d' ' -f 1 > "$OUTDIR"/release.txt
|
||||
date >> "$OUTDIR"/release.txt
|
||||
git rev-parse HEAD >> "$OUTDIR"/release.txt
|
||||
|
||||
# Place a json schema for the file format into the build directory too
|
||||
node scripts/generate-file-format-schema-json.js > "$OUTDIR"/file-format-schema.json
|
||||
|
||||
# Build the compiled assets
|
||||
node_modules/.bin/parcel build assets/index.html --no-cache --out-dir "$OUTDIR" --public-url "./" --detailed-report
|
||||
@@ -0,0 +1,56 @@
|
||||
import * as esbuild from 'esbuild'
|
||||
import {buildOptions, generateIndexHtml} from './esbuild-shared'
|
||||
|
||||
function parseArgs() {
|
||||
const args = process.argv.slice(2)
|
||||
const result: {outdir?: string; protocol?: 'http' | 'file'} = {}
|
||||
|
||||
for (let i = 0; i < args.length; i += 2) {
|
||||
switch (args[i]) {
|
||||
case '--outdir':
|
||||
result.outdir = args[i + 1]
|
||||
break
|
||||
case '--protocol':
|
||||
result.protocol = args[i + 1] as 'http' | 'file'
|
||||
break
|
||||
}
|
||||
}
|
||||
return result
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const {outdir, protocol: servingProtocol} = parseArgs()
|
||||
|
||||
if (!outdir || !servingProtocol) {
|
||||
console.error('Usage: build-release.ts --outdir <outdir> --protocol <serving_protocol>')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
if (servingProtocol !== 'http' && servingProtocol !== 'file') {
|
||||
console.error('serving_protocol must be either "http" or "file"')
|
||||
process.exit(1)
|
||||
}
|
||||
|
||||
let buildResult = await esbuild.build({
|
||||
...buildOptions,
|
||||
minify: true,
|
||||
metafile: true,
|
||||
...(servingProtocol === 'file'
|
||||
? {
|
||||
format: 'iife',
|
||||
splitting: false,
|
||||
}
|
||||
: {}),
|
||||
outdir,
|
||||
})
|
||||
|
||||
generateIndexHtml({
|
||||
buildResult,
|
||||
outdir,
|
||||
servingProtocol,
|
||||
})
|
||||
|
||||
console.log(`Successfully built to ${outdir}`)
|
||||
}
|
||||
|
||||
main()
|
||||
+5
-7
@@ -7,12 +7,10 @@
|
||||
set -euxo pipefail
|
||||
|
||||
SRCDIR=`pwd`
|
||||
OUTDIR=`mktemp -d -t speedscope-unpacked`
|
||||
OUTDIR=`pwd`/dist/http-release
|
||||
|
||||
# Untar the package
|
||||
pushd "$OUTDIR"
|
||||
PACKEDNAME=`npm pack speedscope | tail -n1`
|
||||
tar -xvvf "$PACKEDNAME"
|
||||
# Build the release with http protocol
|
||||
./scripts/prepack.sh --outdir "$OUTDIR" --protocol http
|
||||
|
||||
# Create a shallow clone of the repository
|
||||
TMPDIR=`mktemp -d -t speedscope-deploy`
|
||||
@@ -22,7 +20,7 @@ git clone --depth 1 git@github.com:jlfwong/speedscope.git -b gh-pages
|
||||
# Copy the build artifacts into the shallow clone
|
||||
pushd speedscope
|
||||
rm -rf *
|
||||
cp -R "$OUTDIR"/package/dist/release/** .
|
||||
cp -R "$OUTDIR"/* .
|
||||
|
||||
# Set the CNAME record
|
||||
echo www.speedscope.app > CNAME
|
||||
@@ -37,7 +35,7 @@ function ctrl_c() {
|
||||
if [[ $REPLY =~ ^yes$ ]]
|
||||
then
|
||||
git add --all
|
||||
git commit -m "Deploy $PACKEDNAME"
|
||||
git commit -m "Deploy $(date +%Y-%m-%d)"
|
||||
git push origin HEAD:gh-pages
|
||||
rm -rf "$TMPDIR"
|
||||
exit 0
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
import * as esbuild from 'esbuild'
|
||||
import {buildOptions, generateIndexHtml} from './esbuild-shared'
|
||||
|
||||
async function main() {
|
||||
const outdir = 'dist'
|
||||
let ctx = await esbuild.context({
|
||||
...buildOptions,
|
||||
outdir,
|
||||
write: false,
|
||||
metafile: true,
|
||||
plugins: [
|
||||
{
|
||||
name: 'speedscope-dev-server',
|
||||
setup(build) {
|
||||
build.onEnd(buildResult => {
|
||||
generateIndexHtml({
|
||||
buildResult,
|
||||
outdir,
|
||||
servingProtocol: 'http',
|
||||
})
|
||||
})
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
|
||||
await ctx.rebuild()
|
||||
|
||||
let {host, port} = await ctx.serve({
|
||||
servedir: outdir,
|
||||
})
|
||||
|
||||
console.log(`Server is running at http://${host}:${port}`)
|
||||
}
|
||||
|
||||
main()
|
||||
@@ -0,0 +1,112 @@
|
||||
import * as fs from 'fs'
|
||||
import * as path from 'path'
|
||||
import * as esbuild from 'esbuild'
|
||||
|
||||
const entryPoint = 'src/speedscope.tsx'
|
||||
|
||||
export const buildOptions: esbuild.BuildOptions = {
|
||||
entryPoints: [
|
||||
entryPoint,
|
||||
|
||||
// This is a kind of silly way to ensure that all of these files end up being
|
||||
// discovered by esbuild and copied into the output directory
|
||||
'assets/favicon-16x16.png',
|
||||
'assets/favicon-32x32.png',
|
||||
'assets/favicon.ico',
|
||||
],
|
||||
entryNames: '[name]-[hash]',
|
||||
chunkNames: '[name]-[hash]',
|
||||
assetNames: '[name]-[hash]',
|
||||
sourcemap: true,
|
||||
bundle: true,
|
||||
format: 'esm',
|
||||
splitting: true,
|
||||
loader: {
|
||||
'.txt': 'file',
|
||||
'.woff2': 'file',
|
||||
'.png': 'file',
|
||||
'.ico': 'file',
|
||||
},
|
||||
}
|
||||
|
||||
interface GenerateIndexHtmlOptions {
|
||||
buildResult: esbuild.BuildResult
|
||||
outdir: string
|
||||
servingProtocol: 'file' | 'http'
|
||||
}
|
||||
|
||||
export const generateIndexHtml = ({
|
||||
buildResult,
|
||||
outdir,
|
||||
servingProtocol,
|
||||
}: GenerateIndexHtmlOptions) => {
|
||||
const outputs = buildResult.metafile!.outputs
|
||||
|
||||
function getOutput(entryPoint: string): [string, esbuild.Metafile['outputs'][string]] {
|
||||
const key = Object.keys(outputs).find(key => outputs[key].entryPoint === entryPoint)!
|
||||
return [key, outputs[key]]
|
||||
}
|
||||
|
||||
function getHashedFilePath(name: string) {
|
||||
return path.basename(getOutput(name)[1].imports.find(i => i.kind === 'file-loader')!.path)
|
||||
}
|
||||
|
||||
const [mainChunkPath, mainChunk] = getOutput(entryPoint)
|
||||
const mainChunkName = path.basename(mainChunkPath)
|
||||
|
||||
const mainChunkCssPath = mainChunk.cssBundle!
|
||||
const cssChunk = outputs[mainChunkCssPath]
|
||||
|
||||
const fontPath = cssChunk.imports.find(i => i.path.endsWith('.woff2'))!.path
|
||||
const fontName = path.basename(fontPath)
|
||||
|
||||
const syncDependencyNames = mainChunk.imports
|
||||
.filter(i => i.kind === 'import-statement')
|
||||
.map(i => path.basename(i.path))
|
||||
const asyncDependencyNames = mainChunk.imports
|
||||
.filter(i => i.kind === 'dynamic-import')
|
||||
.map(i => path.basename(i.path))
|
||||
|
||||
// If we're serving from a file protocol, we can't use module
|
||||
// scripts
|
||||
const scriptType = servingProtocol === 'file' ? '' : ' type="module"'
|
||||
|
||||
const favicon16x16Path = getHashedFilePath('assets/favicon-16x16.png')
|
||||
const favicon32x32Path = getHashedFilePath('assets/favicon-32x32.png')
|
||||
const faviconIcoPath = getHashedFilePath('assets/favicon.ico')
|
||||
|
||||
const html = `<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||
<title>speedscope</title>
|
||||
<link rel="stylesheet" href="${path.basename(mainChunk.cssBundle!)}">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="${favicon32x32Path}">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="${favicon16x16Path}">
|
||||
<link rel="icon" type="image/x-icon" href="${faviconIcoPath}">
|
||||
</head>
|
||||
<body>
|
||||
<script src="${mainChunkName}"${scriptType}></script>
|
||||
${syncDependencyNames.map(dep => `<script src="${dep}"${scriptType}></script>`).join('\n ')}
|
||||
${asyncDependencyNames
|
||||
.map(
|
||||
dep =>
|
||||
`<script src="${dep}"${scriptType}${
|
||||
servingProtocol === 'file' ? '' : ' async'
|
||||
}></script>`,
|
||||
)
|
||||
.join('\n ')}
|
||||
${
|
||||
/* Preload is blocked by CORS, so we can't use it with file:/// URLs */
|
||||
servingProtocol === 'file'
|
||||
? ''
|
||||
: `<link rel="preload" href="${fontName}" as="font" type="font/woff2" crossorigin>`
|
||||
}
|
||||
</body>
|
||||
</html>
|
||||
`
|
||||
|
||||
fs.writeFileSync(`${outdir}/index.html`, html)
|
||||
}
|
||||
Executable
+53
@@ -0,0 +1,53 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
# Parse command line arguments
|
||||
while [[ $# -gt 0 ]]; do
|
||||
case $1 in
|
||||
--outdir)
|
||||
OUTDIR="$2"
|
||||
shift 2
|
||||
;;
|
||||
--protocol)
|
||||
PROTOCOL="$2"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
echo "Unknown argument: $1"
|
||||
echo "Usage: $0 --outdir <output_directory> --protocol <serving_protocol>"
|
||||
echo "serving_protocol must be either 'http' or 'file'"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# Validate required arguments
|
||||
if [ -z "${OUTDIR:-}" ] || [ -z "${PROTOCOL:-}" ]; then
|
||||
echo "Usage: $0 --outdir <output_directory> --protocol <serving_protocol>"
|
||||
echo "serving_protocol must be either 'http' or 'file'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$PROTOCOL" != "http" ] && [ "$PROTOCOL" != "file" ]; then
|
||||
echo "Error: serving_protocol must be either 'http' or 'file'"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Clean out the release directory
|
||||
rm -rf "$OUTDIR"
|
||||
mkdir -p "$OUTDIR"
|
||||
|
||||
# Place info about the current commit into the build dir to easily identify releases
|
||||
npm ls -depth -1 | head -n 1 | cut -d' ' -f 1 > "$OUTDIR"/release.txt
|
||||
date >> "$OUTDIR"/release.txt
|
||||
git rev-parse HEAD >> "$OUTDIR"/release.txt
|
||||
|
||||
# Place a json schema for the file format into the build directory too
|
||||
node scripts/generate-file-format-schema-json.js > "$OUTDIR"/file-format-schema.json
|
||||
|
||||
# Include licenses
|
||||
# https://github.com/jlfwong/speedscope/pull/412
|
||||
cp assets/source-code-pro/LICENSE.md "$OUTDIR"/source-code-pro.LICENSE.md
|
||||
|
||||
node_modules/.bin/tsx scripts/build-release.ts --outdir "$OUTDIR" --protocol "$PROTOCOL"
|
||||
@@ -5,11 +5,11 @@
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
TMPDIR=`mktemp -d -t speedscope-test-installation`
|
||||
TESTDIR=`mktemp -d -t speedscope-test-installation`
|
||||
PACKEDNAME=`npm pack | tail -n1`
|
||||
|
||||
mv "$PACKEDNAME" "$TMPDIR"
|
||||
cd "$TMPDIR"
|
||||
mv "$PACKEDNAME" "$TESTDIR"
|
||||
cd "$TESTDIR"
|
||||
tar -xvvf "$PACKEDNAME"
|
||||
cd package
|
||||
npm install
|
||||
@@ -17,4 +17,4 @@ npm install
|
||||
set +x
|
||||
echo
|
||||
echo "Run the following command to switch into the test directory"
|
||||
echo cd "$TMPDIR"/package
|
||||
echo cd "$TESTDIR"/package
|
||||
@@ -11,6 +11,12 @@
|
||||
|
||||
set -euxo pipefail
|
||||
|
||||
# Typecheck
|
||||
node_modules/.bin/tsc --noEmit
|
||||
|
||||
# Run unit tests
|
||||
npm run jest
|
||||
|
||||
if [ $# -lt 1 ]; then
|
||||
echo "Usage: $0 <minor | patch | version>"
|
||||
echo "e.g. $0 patch"
|
||||
|
||||
@@ -654,6 +654,504 @@ Object {
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`importFromInstrumentsDeepCopy time profile, version 16 1`] = `
|
||||
Object {
|
||||
"frames": Array [
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":start",
|
||||
"line": undefined,
|
||||
"name": "start",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 4479,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":main",
|
||||
"line": undefined,
|
||||
"name": "main",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 4475,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":delta()",
|
||||
"line": undefined,
|
||||
"name": "delta()",
|
||||
"selfWeight": 395,
|
||||
"totalWeight": 2000,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":alpha()",
|
||||
"line": undefined,
|
||||
"name": "alpha()",
|
||||
"selfWeight": 1574,
|
||||
"totalWeight": 1600,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":leakMemory()",
|
||||
"line": undefined,
|
||||
"name": "leakMemory()",
|
||||
"selfWeight": 2,
|
||||
"totalWeight": 65,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":szone_malloc_should_clear",
|
||||
"line": undefined,
|
||||
"name": "szone_malloc_should_clear",
|
||||
"selfWeight": 7,
|
||||
"totalWeight": 49,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":small_malloc_should_clear",
|
||||
"line": undefined,
|
||||
"name": "small_malloc_should_clear",
|
||||
"selfWeight": 20,
|
||||
"totalWeight": 44,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":small_malloc_from_free_list",
|
||||
"line": undefined,
|
||||
"name": "small_malloc_from_free_list",
|
||||
"selfWeight": 20,
|
||||
"totalWeight": 20,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":_malloc_zone_malloc",
|
||||
"line": undefined,
|
||||
"name": "_malloc_zone_malloc",
|
||||
"selfWeight": 14,
|
||||
"totalWeight": 14,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":beta()",
|
||||
"line": undefined,
|
||||
"name": "beta()",
|
||||
"selfWeight": 1602,
|
||||
"totalWeight": 1629,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":rack_get_thread_index",
|
||||
"line": undefined,
|
||||
"name": "rack_get_thread_index",
|
||||
"selfWeight": 6,
|
||||
"totalWeight": 6,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":nanov2_malloc_type",
|
||||
"line": undefined,
|
||||
"name": "nanov2_malloc_type",
|
||||
"selfWeight": 6,
|
||||
"totalWeight": 6,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":DYLD-STUB$$malloc",
|
||||
"line": undefined,
|
||||
"name": "DYLD-STUB$$malloc",
|
||||
"selfWeight": 1,
|
||||
"totalWeight": 1,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":mvm_allocate_pages_plat",
|
||||
"line": undefined,
|
||||
"name": "mvm_allocate_pages_plat",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":_kernelrpc_mach_vm_map_trap",
|
||||
"line": undefined,
|
||||
"name": "_kernelrpc_mach_vm_map_trap",
|
||||
"selfWeight": 1,
|
||||
"totalWeight": 1,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":gamma()",
|
||||
"line": undefined,
|
||||
"name": "gamma()",
|
||||
"selfWeight": 827,
|
||||
"totalWeight": 838,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const",
|
||||
"line": undefined,
|
||||
"name": "dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 4,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)",
|
||||
"line": undefined,
|
||||
"name": "dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*)",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 4,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&)",
|
||||
"line": undefined,
|
||||
"name": "dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&)",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const",
|
||||
"line": undefined,
|
||||
"name": "mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":mach_o::Header::forEachLoadCommand(void (load_command const*, bool&) block_pointer) const",
|
||||
"line": undefined,
|
||||
"name": "mach_o::Header::forEachLoadCommand(void (load_command const*, bool&) block_pointer) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":invocation function for block in mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const",
|
||||
"line": undefined,
|
||||
"name": "invocation function for block in mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":invocation function for block in dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&)",
|
||||
"line": undefined,
|
||||
"name": "invocation function for block in dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&)",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&)",
|
||||
"line": undefined,
|
||||
"name": "dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&)",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::Loader::forEachPath(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer)",
|
||||
"line": undefined,
|
||||
"name": "dyld4::Loader::forEachPath(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer)",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const",
|
||||
"line": undefined,
|
||||
"name": "dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::Loader::forEachResolvedAtPathVar(dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, dyld4::ProcessConfig::PathOverrides::Type, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer)",
|
||||
"line": undefined,
|
||||
"name": "dyld4::Loader::forEachResolvedAtPathVar(dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, dyld4::ProcessConfig::PathOverrides::Type, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer)",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":invocation function for block in dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&)",
|
||||
"line": undefined,
|
||||
"name": "invocation function for block in dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&)",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::Loader::makeDyldCacheLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, unsigned int, mach_o::Layout const*)",
|
||||
"line": undefined,
|
||||
"name": "dyld4::Loader::makeDyldCacheLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, unsigned int, mach_o::Layout const*)",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::RuntimeState::findPrebuiltLoader(char const*) const",
|
||||
"line": undefined,
|
||||
"name": "dyld4::RuntimeState::findPrebuiltLoader(char const*) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::PrebuiltLoader::isValid(dyld4::RuntimeState const&) const",
|
||||
"line": undefined,
|
||||
"name": "dyld4::PrebuiltLoader::isValid(dyld4::RuntimeState const&) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const",
|
||||
"line": undefined,
|
||||
"name": "dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":invocation function for block in dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const",
|
||||
"line": undefined,
|
||||
"name": "invocation function for block in dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::SyscallDelegate::fileExists(char const*, dyld4::FileID*, int*) const",
|
||||
"line": undefined,
|
||||
"name": "dyld4::SyscallDelegate::fileExists(char const*, dyld4::FileID*, int*) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld3::stat(char const*, stat*)",
|
||||
"line": undefined,
|
||||
"name": "dyld3::stat(char const*, stat*)",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":stat",
|
||||
"line": undefined,
|
||||
"name": "stat",
|
||||
"selfWeight": 3,
|
||||
"totalWeight": 3,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::APIs::runAllInitializersForMain()",
|
||||
"line": undefined,
|
||||
"name": "dyld4::APIs::runAllInitializersForMain()",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const",
|
||||
"line": undefined,
|
||||
"name": "dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const",
|
||||
"line": undefined,
|
||||
"name": "dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const",
|
||||
"line": undefined,
|
||||
"name": "dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const",
|
||||
"line": undefined,
|
||||
"name": "dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const",
|
||||
"line": undefined,
|
||||
"name": "dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const",
|
||||
"line": undefined,
|
||||
"name": "dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const",
|
||||
"line": undefined,
|
||||
"name": "dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const",
|
||||
"line": undefined,
|
||||
"name": "dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const",
|
||||
"line": undefined,
|
||||
"name": "invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const",
|
||||
"line": undefined,
|
||||
"name": "invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const",
|
||||
"selfWeight": 0,
|
||||
"totalWeight": 1,
|
||||
},
|
||||
Frame {
|
||||
"col": undefined,
|
||||
"file": undefined,
|
||||
"key": ":_GLOBAL__sub_I_stdlib_typed_new.cpp",
|
||||
"line": undefined,
|
||||
"name": "_GLOBAL__sub_I_stdlib_typed_new.cpp",
|
||||
"selfWeight": 1,
|
||||
"totalWeight": 1,
|
||||
},
|
||||
],
|
||||
"name": "simple-time-profile-deep-copy.txt",
|
||||
"stacks": Array [
|
||||
"start;main;delta();alpha();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;small_malloc_from_free_list 2.00ms",
|
||||
"start;main;delta();alpha();leakMemory();szone_malloc_should_clear;small_malloc_should_clear 4.00ms",
|
||||
"start;main;delta();alpha();leakMemory();szone_malloc_should_clear;small_malloc_from_free_list 1.00ms",
|
||||
"start;main;delta();alpha();leakMemory();szone_malloc_should_clear 1.00ms",
|
||||
"start;main;delta();alpha();leakMemory();_malloc_zone_malloc 1.00ms",
|
||||
"start;main;delta();alpha();_malloc_zone_malloc 2.00ms",
|
||||
"start;main;delta();alpha() 786.00ms",
|
||||
"start;main;delta();beta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;small_malloc_from_free_list 5.00ms",
|
||||
"start;main;delta();beta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;rack_get_thread_index 1.00ms",
|
||||
"start;main;delta();beta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear 3.00ms",
|
||||
"start;main;delta();beta();leakMemory();szone_malloc_should_clear 2.00ms",
|
||||
"start;main;delta();beta();leakMemory();nanov2_malloc_type 1.00ms",
|
||||
"start;main;delta();beta();leakMemory();DYLD-STUB$$malloc 1.00ms",
|
||||
"start;main;delta();beta();leakMemory() 1.00ms",
|
||||
"start;main;delta();beta();nanov2_malloc_type 2.00ms",
|
||||
"start;main;delta();beta();_malloc_zone_malloc 1.00ms",
|
||||
"start;main;delta();beta() 778.00ms",
|
||||
"start;main;delta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;mvm_allocate_pages_plat;_kernelrpc_mach_vm_map_trap 1.00ms",
|
||||
"start;main;delta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear 3.00ms",
|
||||
"start;main;delta();leakMemory();szone_malloc_should_clear 3.00ms",
|
||||
"start;main;delta();leakMemory();small_malloc_should_clear 2.00ms",
|
||||
"start;main;delta();leakMemory();_malloc_zone_malloc 1.00ms",
|
||||
"start;main;delta();_malloc_zone_malloc 3.00ms",
|
||||
"start;main;delta() 395.00ms",
|
||||
"start;main;gamma();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;small_malloc_from_free_list 3.00ms",
|
||||
"start;main;gamma();leakMemory();szone_malloc_should_clear;small_malloc_should_clear 1.00ms",
|
||||
"start;main;gamma();leakMemory();szone_malloc_should_clear;rack_get_thread_index 1.00ms",
|
||||
"start;main;gamma();leakMemory();small_malloc_should_clear 1.00ms",
|
||||
"start;main;gamma();leakMemory();_malloc_zone_malloc 1.00ms",
|
||||
"start;main;gamma();leakMemory();nanov2_malloc_type 1.00ms",
|
||||
"start;main;gamma();leakMemory() 1.00ms",
|
||||
"start;main;gamma();_malloc_zone_malloc 2.00ms",
|
||||
"start;main;gamma() 827.00ms",
|
||||
"start;main;beta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;small_malloc_from_free_list 4.00ms",
|
||||
"start;main;beta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;rack_get_thread_index 1.00ms",
|
||||
"start;main;beta();leakMemory();szone_malloc_should_clear;small_malloc_should_clear 1.00ms",
|
||||
"start;main;beta();leakMemory();szone_malloc_should_clear;rack_get_thread_index 1.00ms",
|
||||
"start;main;beta();leakMemory();nanov2_malloc_type 1.00ms",
|
||||
"start;main;beta();leakMemory();small_malloc_should_clear 1.00ms",
|
||||
"start;main;beta();_malloc_zone_malloc 1.00ms",
|
||||
"start;main;beta() 824.00ms",
|
||||
"start;main;alpha();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;small_malloc_from_free_list 5.00ms",
|
||||
"start;main;alpha();leakMemory();szone_malloc_should_clear;small_malloc_should_clear;rack_get_thread_index 2.00ms",
|
||||
"start;main;alpha();leakMemory();szone_malloc_should_clear;small_malloc_should_clear 3.00ms",
|
||||
"start;main;alpha();leakMemory();szone_malloc_should_clear 1.00ms",
|
||||
"start;main;alpha();leakMemory();nanov2_malloc_type 1.00ms",
|
||||
"start;main;alpha();leakMemory();small_malloc_should_clear 1.00ms",
|
||||
"start;main;alpha();leakMemory();_malloc_zone_malloc 1.00ms",
|
||||
"start;main;alpha();_malloc_zone_malloc 1.00ms",
|
||||
"start;main;alpha() 788.00ms",
|
||||
"start;dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const;dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*);dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&);mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const;mach_o::Header::forEachLoadCommand(void (load_command const*, bool&) block_pointer) const;invocation function for block in mach_o::Header::forEachLinkedDylib(void (char const*, mach_o::LinkedDylibAttributes, mach_o::Version32, mach_o::Version32, bool&) block_pointer) const;invocation function for block in dyld4::JustInTimeLoader::loadDependents(Diagnostics&, dyld4::RuntimeState&, dyld4::Loader::LoadOptions const&);dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&);dyld4::Loader::forEachPath(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer);dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const;dyld4::Loader::forEachResolvedAtPathVar(dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, dyld4::ProcessConfig::PathOverrides::Type, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer);invocation function for block in dyld4::Loader::getLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&);dyld4::Loader::makeDyldCacheLoader(Diagnostics&, dyld4::RuntimeState&, char const*, dyld4::Loader::LoadOptions const&, unsigned int, mach_o::Layout const*);dyld4::RuntimeState::findPrebuiltLoader(char const*) const;dyld4::PrebuiltLoader::isValid(dyld4::RuntimeState const&) const;dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const;dyld4::ProcessConfig::PathOverrides::forEachPathVariant(char const*, dyld3::Platform, bool, bool, bool&, void (char const*, dyld4::ProcessConfig::PathOverrides::Type, bool&) block_pointer) const;invocation function for block in dyld4::PrebuiltLoader::invalidateInIsolation(dyld4::RuntimeState const&) const;dyld4::SyscallDelegate::fileExists(char const*, dyld4::FileID*, int*) const;dyld3::stat(char const*, stat*);stat 3.00ms",
|
||||
"start;dyld4::start(dyld4::KernelArgs*, void*, void*)::$_0::operator()() const;dyld4::prepare(dyld4::APIs&, dyld3::MachOAnalyzer const*);dyld4::APIs::runAllInitializersForMain();dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const;dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const;dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const;dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const;dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const;dyld4::PrebuiltLoader::runInitializers(dyld4::RuntimeState&) const;dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const;dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const;dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const;dyld3::MachOFile::forEachLoadCommand(Diagnostics&, void (load_command const*, bool&) block_pointer) const;invocation function for block in dyld3::MachOFile::forEachSection(void (dyld3::MachOFile::SectionInfo const&, bool, bool&) block_pointer) const;invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const;_GLOBAL__sub_I_stdlib_typed_new.cpp 1.00ms",
|
||||
],
|
||||
}
|
||||
`;
|
||||
|
||||
exports[`importFromInstrumentsDeepCopy time profile, version 16: indexToView 1`] = `0`;
|
||||
|
||||
exports[`importFromInstrumentsDeepCopy time profile, version 16: profileGroup.name 1`] = `"simple-time-profile-deep-copy.txt"`;
|
||||
|
||||
exports[`importFromInstrumentsDeepCopy time profile: indexToView 1`] = `0`;
|
||||
|
||||
exports[`importFromInstrumentsDeepCopy time profile: profileGroup.name 1`] = `"simple-time-profile-deep-copy.txt"`;
|
||||
|
||||
@@ -12,6 +12,12 @@ describe('importFromInstrumentsDeepCopy', () => {
|
||||
)
|
||||
})
|
||||
|
||||
test('time profile, version 16', async () => {
|
||||
await checkProfileSnapshot(
|
||||
'./sample/profiles/Instruments/16.0/simple-time-profile-deep-copy.txt',
|
||||
)
|
||||
})
|
||||
|
||||
test('allocations profile', async () => {
|
||||
await checkProfileSnapshot(
|
||||
'./sample/profiles/Instruments/7.3.1/random-allocations-deep-copy.txt',
|
||||
|
||||
@@ -38,12 +38,14 @@ interface PastedTimeProfileRow {
|
||||
Weight?: string
|
||||
'Source Path'?: string
|
||||
'Symbol Name'?: string
|
||||
'Symbol Names'?: string
|
||||
}
|
||||
|
||||
interface PastedAllocationsProfileRow {
|
||||
'Bytes Used'?: string
|
||||
'Source Path'?: string
|
||||
'Symbol Name'?: string
|
||||
'Symbol Names'?: string
|
||||
}
|
||||
|
||||
interface FrameInfoWithWeight extends FrameInfo {
|
||||
@@ -108,9 +110,12 @@ export function importFromInstrumentsDeepCopy(contents: TextFileContent): Profil
|
||||
|
||||
const stack: FrameInfoWithWeight[] = []
|
||||
let cumulativeValue: number = 0
|
||||
let leadingFirstRowSpaces: number = rows[0]['Symbol Names']
|
||||
? rows[0]['Symbol Names'].lastIndexOf(' ') + 1
|
||||
: 0
|
||||
|
||||
for (let row of rows) {
|
||||
const symbolName = row['Symbol Name']
|
||||
const symbolName = row['Symbol Name'] || row['Symbol Names']?.slice(leadingFirstRowSpaces)
|
||||
if (!symbolName) continue
|
||||
const trimmedSymbolName = symbolName.trim()
|
||||
let stackDepth = symbolName.length - trimmedSymbolName.length
|
||||
|
||||
+48
-24
@@ -349,14 +349,50 @@ function frameInfoForEvent(
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an array mapping pid-tid keys to profile builders. Both the traceEvent[]
|
||||
* format and the sample + stack frame based object format specify the process and thread
|
||||
* names based on metadata so we share this logic.
|
||||
*
|
||||
* See https://docs.google.com/document/d/1CvAClvFfyA5R-PhYUmn5OOQtYMH4h6I0nSsKchNAySU/preview#heading=h.xqopa5m0e28f
|
||||
*/
|
||||
function getProfileNameByPidTid(
|
||||
function getProfileName(
|
||||
processName: string | undefined,
|
||||
threadName: string | undefined,
|
||||
pid: number,
|
||||
tid: number,
|
||||
): string {
|
||||
if (processName != null && threadName != null) {
|
||||
return `${processName} (pid ${pid}), ${threadName} (tid ${tid})`
|
||||
} else if (processName != null) {
|
||||
return `${processName} (pid ${pid}, tid ${tid})`
|
||||
} else if (threadName != null) {
|
||||
return `${threadName} (pid ${pid}, tid ${tid})`
|
||||
} else {
|
||||
return `pid ${pid}, tid ${tid}`
|
||||
}
|
||||
}
|
||||
|
||||
function getProfileNamesFromSamples(
|
||||
events: TraceEvent[],
|
||||
partitionedSamples: Map<string, Sample[]>,
|
||||
): Map<string, string> {
|
||||
const processNamesByPid = getProcessNamesByPid(events)
|
||||
const threadNamesByPidTid = getThreadNamesByPidTid(events)
|
||||
|
||||
const profileNamesByPidTid = new Map<string, string>()
|
||||
|
||||
partitionedSamples.forEach(samples => {
|
||||
if (samples.length === 0) return
|
||||
|
||||
const pid = Number(samples[0].pid)
|
||||
const tid = Number(samples[0].tid)
|
||||
|
||||
const profileKey = pidTidKey(pid, tid)
|
||||
const processName = processNamesByPid.get(pid)
|
||||
const threadName = threadNamesByPidTid.get(profileKey)
|
||||
const profileName = getProfileName(processName, threadName, pid, tid)
|
||||
|
||||
profileNamesByPidTid.set(profileKey, profileName)
|
||||
})
|
||||
|
||||
return profileNamesByPidTid
|
||||
}
|
||||
|
||||
function getProfileNamesFromTraceEvents(
|
||||
events: TraceEvent[],
|
||||
partitionedTraceEvents: Map<string, TraceEvent[]>,
|
||||
): Map<string, string> {
|
||||
@@ -373,19 +409,9 @@ function getProfileNameByPidTid(
|
||||
const profileKey = pidTidKey(pid, tid)
|
||||
const processName = processNamesByPid.get(pid)
|
||||
const threadName = threadNamesByPidTid.get(profileKey)
|
||||
const profileName = getProfileName(processName, threadName, pid, tid)
|
||||
|
||||
if (processName != null && threadName != null) {
|
||||
profileNamesByPidTid.set(
|
||||
profileKey,
|
||||
`${processName} (pid ${pid}), ${threadName} (tid ${tid})`,
|
||||
)
|
||||
} else if (processName != null) {
|
||||
profileNamesByPidTid.set(profileKey, `${processName} (pid ${pid}, tid ${tid})`)
|
||||
} else if (threadName != null) {
|
||||
profileNamesByPidTid.set(profileKey, `${threadName} (pid ${pid}, tid ${tid})`)
|
||||
} else {
|
||||
profileNamesByPidTid.set(profileKey, `pid ${pid}, tid ${tid}`)
|
||||
}
|
||||
profileNamesByPidTid.set(profileKey, profileName)
|
||||
})
|
||||
|
||||
return profileNamesByPidTid
|
||||
@@ -616,7 +642,7 @@ function eventListToProfileGroup(
|
||||
): ProfileGroup {
|
||||
const importableEvents = filterIgnoredEventTypes(events)
|
||||
const partitionedTraceEvents = partitionByPidTid(importableEvents)
|
||||
const profileNamesByPidTid = getProfileNameByPidTid(events, partitionedTraceEvents)
|
||||
const profileNamesByPidTid = getProfileNamesFromTraceEvents(events, partitionedTraceEvents)
|
||||
|
||||
const profilePairs: [string, Profile][] = []
|
||||
|
||||
@@ -647,10 +673,8 @@ function eventListToProfileGroup(
|
||||
}
|
||||
|
||||
function sampleListToProfileGroup(contents: TraceWithSamples): ProfileGroup {
|
||||
const importableEvents = filterIgnoredEventTypes(contents.traceEvents)
|
||||
const partitionedTraceEvents = partitionByPidTid(importableEvents)
|
||||
const partitionedSamples = partitionByPidTid(contents.samples)
|
||||
const profileNamesByPidTid = getProfileNameByPidTid(contents.traceEvents, partitionedTraceEvents)
|
||||
const profileNamesByPidTid = getProfileNamesFromSamples(contents.traceEvents, partitionedSamples)
|
||||
|
||||
const profilePairs: [string, Profile][] = []
|
||||
|
||||
|
||||
@@ -66,6 +66,8 @@ declare const module: any
|
||||
if (process.env.NODE_ENV === 'development') {
|
||||
;(window as any)['Atom'] = AtomDev = {}
|
||||
|
||||
/*
|
||||
TODO(jlfwong): Fix this
|
||||
module.hot.dispose(() => {
|
||||
if (AtomDev) {
|
||||
hotReloadStash = new Map()
|
||||
@@ -76,6 +78,7 @@ if (process.env.NODE_ENV === 'development') {
|
||||
|
||||
;(window as any)['Atom_hotReloadStash'] = hotReloadStash
|
||||
})
|
||||
*/
|
||||
|
||||
hotReloadStash = (window as any)['Atom_hotReloadStash'] || null
|
||||
}
|
||||
|
||||
@@ -65,7 +65,7 @@ export namespace FileFormat {
|
||||
unit: ValueUnit
|
||||
|
||||
// The starting value of the profile. This will typically be a timestamp.
|
||||
// All event values will be relative to this startValue.
|
||||
// All event values will be displayed relative to this startValue.
|
||||
startValue: number
|
||||
|
||||
// The final value of the profile. This will typically be a timestamp. This
|
||||
@@ -93,7 +93,7 @@ export namespace FileFormat {
|
||||
unit: ValueUnit
|
||||
|
||||
// The starting value of the profile. This will typically be a timestamp.
|
||||
// All event values will be relative to this startValue.
|
||||
// All event values will be displayed relative to this startValue.
|
||||
startValue: number
|
||||
|
||||
// The final value of the profile. This will typically be a timestamp. This
|
||||
|
||||
@@ -6,24 +6,11 @@
|
||||
// URL, but I want speedscope to work standalone offline. This means that the remaining
|
||||
// options require some way of having a local URL that corresponds the .wasm file.
|
||||
//
|
||||
// Also as of writing, speedscope is bundled with Parcel v1. Trying to import
|
||||
// a .wasm file in Parcel v1 tries to load the wasm module itself, which is not
|
||||
// what I'm trying to do -- I want SourceMapConsumer.initialize to be the thing
|
||||
// booting the WebAssembly, not Parcel itself.
|
||||
//
|
||||
// One way of getting around this problem is to modify the build system to
|
||||
// copy the .wasm file from node_modules/source-map/lib/mappings.wasm. I could do
|
||||
// this, but it's a bit of a pain.
|
||||
//
|
||||
// Another would be to use something like
|
||||
// import("url:../node_modules/source-map/lib/mappings.wasm"), and then pass the
|
||||
// resulting URL to SourceMapConsumer.initialize. This is also kind of a pain,
|
||||
// because I can only do that if I upgrade to Parcel v2. Ultimately, I'd like to
|
||||
// use esbuild rather than parcel at all, so for now I'm just punting on this by
|
||||
// using an old-version of source-map which doesn't depend on wasm.
|
||||
|
||||
// This is rarely used, so let's load it async to avoid bloating the initial
|
||||
// bundle.
|
||||
//
|
||||
// TODO(jlfwong): Revisit using the newer, wasm-based version of source-map now
|
||||
// that we're using esbuild for bundling.
|
||||
import type {MappingItem, RawSourceMap, SourceMapConsumer} from 'source-map'
|
||||
const sourceMapModule = import('source-map')
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ import {ThemeProvider} from './views/themes/theme'
|
||||
|
||||
console.log(`speedscope v${require('../package.json').version}`)
|
||||
|
||||
/*
|
||||
TODO(jlfwong): Fix this
|
||||
declare const module: any
|
||||
if (module.hot) {
|
||||
module.hot.dispose(() => {
|
||||
@@ -12,6 +14,7 @@ if (module.hot) {
|
||||
})
|
||||
module.hot.accept()
|
||||
}
|
||||
*/
|
||||
|
||||
render(
|
||||
<ThemeProvider>
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import '../../assets/reset.css'
|
||||
import '../../assets/source-code-pro.css'
|
||||
|
||||
import {h} from 'preact'
|
||||
import {StyleSheet, css} from 'aphrodite'
|
||||
|
||||
import {ProfileGroup, SymbolRemapper} from '../lib/profile'
|
||||
import {FontFamily, FontSize, Duration} from './style'
|
||||
import {importEmscriptenSymbolMap as importEmscriptenSymbolRemapper} from '../lib/emscripten'
|
||||
import {SandwichViewContainer} from './sandwich-view'
|
||||
import {saveToFile} from '../lib/file-format'
|
||||
import {ActiveProfileState} from '../app-state/active-profile-state'
|
||||
import {LeftHeavyFlamechartView, ChronoFlamechartView} from './flamechart-view-container'
|
||||
@@ -17,6 +19,7 @@ import {canUseXHR} from '../app-state'
|
||||
import {ProfileGroupState} from '../app-state/profile-group'
|
||||
import {HashParams} from '../lib/hash-params'
|
||||
import {StatelessComponent} from '../lib/preact-helpers'
|
||||
import {SandwichViewContainer} from './sandwich-view'
|
||||
|
||||
const importModule = import('../import')
|
||||
|
||||
@@ -168,6 +171,7 @@ export type ApplicationProps = {
|
||||
|
||||
export class Application extends StatelessComponent<ApplicationProps> {
|
||||
private async loadProfile(loader: () => Promise<ProfileGroup | null>) {
|
||||
this.props.setError(false)
|
||||
this.props.setLoading(true)
|
||||
await new Promise(resolve => setTimeout(resolve, 0))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user