Skip to content

Instantly share code, notes, and snippets.

View luser's full-sized avatar

Ted Mielczarek luser

View GitHub Profile
#!/usr/bin/env python
from __future__ import print_function
from collections import defaultdict
import fileinput
data = {'FUNC': defaultdict(list), 'PUBLIC': defaultdict(list)}
for line in fileinput.input():
ty, addr, rest = line.split(' ', 2)
PUBLIC
FUNC
FUNC e2eefe d 0 mozilla::PresShell::GetCurrentEventFrame()
FUNC e2eefe d 0 mozilla::PresShell::GetEventTargetFrame()
FUNC e8e182 b 0 _moz_cairo_image_surface_get_data
FUNC e8e182 b 0 _moz_cairo_image_surface_get_height
FUNC e8e182 b 0 _moz_cairo_image_surface_get_stride
FUNC e8e182 b 0 _moz_cairo_image_surface_get_width
#!/usr/bin/env python
#
# This script fetches symbol files from Mozilla's symbol server matching a
# local Firefox install, determines unique source files mentioned in them, and
# then sums the lines in each source file by reading them from a local clone
# of the mozilla-central Mercurial repository (which the script will update to
# match the revision used to build the copy of Firefox).
#
# The output is a list of file lines by extension in descending order.
@luser
luser / source-count
Created June 15, 2018 19:36
count of source file lines by extension for source files compiled into a macOS Firefox Nightly build
.cpp 3111001
.h 1272859
.c 1207323
.cc 303090
.rs 246356
.mm 57859
.hh 15850
.cxx 14731
.api 1854
.hxx 802
{"inputs": ["/build/sccache/Cargo.toml", "/build/sccache/lru-disk-cache/Cargo.toml", "/home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/aho-corasick-0.6.4/Cargo.toml", "/home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/ansi_term-0.10.2/Cargo.toml", "/home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/assert_cli-0.5.4/Cargo.toml", "/home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/atty-0.2.6/Cargo.toml", "/home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-0.3.5/Cargo.toml", "/home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/backtrace-sys-0.1.16/Cargo.toml", "/home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/base64-0.9.0/Cargo.toml", "/home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/bincode-0.8.0/Cargo.toml", "/home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/bincode-0.9.2/Cargo.toml", "/home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/bitflags-0.9.1/Cargo.toml", "/home/luser/.cargo/registry/src/github.co
{"invocations":[{"package_name":"cc","package_version":"1.0.5","target_kind":["lib"],"kind":"Host","deps":[],"outputs":["/build/servo/target/debug/deps/libcc-aa4b81311e6ce5e2.rlib"],"links":{},"program":"rustc","args":["--crate-name","cc","/home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.5/src/lib.rs","--crate-type","lib","--emit=dep-info,link","-C","debuginfo=2","-C","metadata=aa4b81311e6ce5e2","-C","extra-filename=-aa4b81311e6ce5e2","--out-dir","/build/servo/target/debug/deps","-L","dependency=/build/servo/target/debug/deps","--cap-lints","allow"],"env":{"CARGO":"/home/luser/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo","CARGO_MANIFEST_DIR":"/home/luser/.cargo/registry/src/github.com-1ecc6299db9ec823/cc-1.0.5","CARGO_PKG_AUTHORS":"Alex Crichton <[email protected]>","CARGO_PKG_DESCRIPTION":"A build-time dependency for Cargo build scripts to assist in invoking the native\nC compiler to compile native C code into a static archive to be linked into Rust\ncode.\n","CARGO_PK
digraph G {
0 [label="libc v0.2.36 lib Host"];
1 [label="atty v0.2.6 lib Host"];
1 -> 0 [dir=back,arrowtail="empty"];
2 [label="byteorder v1.2.1 lib Host"];
3 [label="safemem v0.2.0 lib Host"];
4 [label="base64 v0.9.0 lib Host"];
4 -> 2 [dir=back,arrowtail="empty"];
4 -> 3 [dir=back,arrowtail="empty"];
5 [label="serde v1.0.27 lib Host"];
#!/usr/bin/env python
# Takes the output of `cargo +nightly build -Z unstable-options --build-plan` and produces
# a graphviz .dot file.
from __future__ import print_function, unicode_literals
import sys
import json
with open(sys.argv[1]) as f:
{
"Text": {
".dynstr": 8525,
".dynsym": 7008,
".eh_frame": 40804,
".eh_frame_hdr": 9932,
".fini": 9,
".gnu.hash": 1404,
".gnu.version": 584,
".gnu.version_r": 384,
{
"argv": [
"./mach",
"build",
"-v"
],
"cpu_percent": 20.791071428571428,
"cpu_times": [
30.08999999998923,
0.09000000000014552,