Commit a4523a02 authored by Ben Gamari's avatar Ben Gamari 🐢

Merge branch 'master' of gitlab.haskell.org:bgamari/ghc-utils into master

parents c5641595 6dfa7b68
......@@ -47,7 +47,7 @@ in
name = "ghc-utils";
preferLocalBuild = true;
paths = [
gdb.rr gdb.gdb gdb.run-ghc-gdb gdb.run-ghc-rr gdb.dot2svg
gdb.rr gdb.gdb gdb.run-ghc-gdb gdb.run-ghc-rr gdb.dot2svg gdb.zenWorkaround
misc-scripts
rel-eng
gitlab-utils
......
......@@ -67,22 +67,29 @@ with nixpkgs; rec {
buildInputs = oldAttrs.buildInputs ++ [ libipt ];
});
rr = nixpkgs.rr.overrideAttrs (oldAttrs: {
rr = nixpkgs.rr.overrideAttrs (oldAttrs: rec {
src = fetchFromGitHub {
owner = "mozilla";
repo = "rr";
rev = "8fc7d2a09a739fee1883d262501e88613165c1dd";
sha256 = "sha256:0avq5lv082z2sasggfn2awnfrh08cr8f0i9iw1dnrcxa6pc3bi9k";
rev = "2a231a661548a7c62f7df8f674f6299edcb7760a";
sha256 = "sha256:18fyh9f93hy501ihmn5gayqbqym3lng2cqxrpcmqj813fma4ycjc";
};
});
zenWorkaround = nixpkgs.runCommand "zen-workaround"
{ nativeBuildInputs = [ nixpkgs.python3 nixpkgs.makeWrapper ]; }
''
mkdir -p $out/bin
makeWrapper ${rr.src}/scripts/zen_workaround.py $out/bin/zen_workaround.py
'';
pythonEnv = python3.withPackages (_: [ ghc-gdb ]);
env = symlinkJoin {
name = "gdb-with-ghc-gdb";
paths = [
gdb pythonEnv gdbinit rr dot2svg
run-ghc-gdb run-ghc-rr
run-ghc-gdb run-ghc-rr zenWorkaround
];
};
......
......@@ -14,6 +14,8 @@ T = TypeVar('T')
stg_STACK_info = gdb.parse_and_eval('&stg_STACK_info')
CLOSURE_HEADER_SIZE = gdb.parse_and_eval('sizeof(StgHeader)') # bytes
def search_memory_many(inferior: gdb.Inferior, start: Ptr, end: Ptr, val: bytes) -> Iterator[Ptr]:
#print('Searching for %r in %d to %d' % (val, start.addr(), end.addr()))
assert end.addr() > start.addr()
......@@ -167,7 +169,7 @@ def find_containing_closure(inferior: gdb.Inferior,
if ptr.addr() - start.addr() > 8:
# Only trace the indirectee of IND_STATICs
return None
elif i <= nptrs + 5: # A bit of fudge for the headers
elif i <= nptrs + CLOSURE_HEADER_SIZE: # A bit of fudge for the headers
return start
elif int(info['type']) == closure.ClosureType.STACK:
stack = gdb.parse_and_eval('(StgStack *) %d' % start.addr())
......@@ -182,8 +184,7 @@ def find_containing_closure(inferior: gdb.Inferior,
except gdb.MemoryError as e:
print('failed to find containing closure of 0x%x:' % ptr.addr())
traceback.print_exc()
continue
return None
return None
......
......@@ -36,7 +36,10 @@
8.8.1 Win32/2.6.1.0
8.8.2 Win32/2.6.1.0
8.8.3 Win32/2.6.1.0
8.8.4 Win32/2.6.1.0
8.10.1 Win32/2.6.1.0
8.10.2 Win32/2.6.1.0
8.10.3 Win32/2.6.1.0
HEAD Win32/2.6.1.0
############################################
......@@ -102,13 +105,16 @@ HEAD Win32/2.6.1.0
8.8.1 Cabal/3.0.0.0 array/0.5.4.0 base/4.13.0.0 binary/0.8.7.0 bytestring/0.10.9.0 containers/0.6.2.1 deepseq/1.4.4.0 directory/1.3.3.2 filepath/1.4.2.1 ghc/8.8.1* ghc-boot/8.8.1 ghc-boot-th/8.8.1 ghc-compact/0.1.0.0 ghc-heap/8.8.1 ghc-prim/0.5.3 ghci/8.8.1 haskeline/0.7.5.0 hpc/0.6.0.3 integer-gmp/1.0.2.0 libiserv/8.8.1 mtl/2.2.2 parsec/3.1.14.0 pretty/1.1.3.6 process/1.6.5.1 rts/1.0 stm/2.5.0.0 template-haskell/2.15.0.0 terminfo/0.4.1.4 text/1.2.4.0 time/1.9.3 transformers/0.5.6.2 unix/2.7.2.2 xhtml/3000.2.2.1
8.8.2 Cabal/3.0.1.0 array/0.5.4.0 base/4.13.0.0 binary/0.8.7.0 bytestring/0.10.10.0 containers/0.6.2.1 deepseq/1.4.4.0 directory/1.3.4.0 filepath/1.4.2.1 ghc/8.8.2* ghc-boot/8.8.2 ghc-boot-th/8.8.2 ghc-compact/0.1.0.0 ghc-heap/8.8.2 ghc-prim/0.5.3 ghci/8.8.2 haskeline/0.7.5.0 hpc/0.6.0.3 integer-gmp/1.0.2.0 libiserv/8.8.2 mtl/2.2.2 parsec/3.1.14.0 pretty/1.1.3.6 process/1.6.7.0 rts/1.0 stm/2.5.0.0 template-haskell/2.15.0.0 terminfo/0.4.1.4 text/1.2.4.0 time/1.9.3 transformers/0.5.6.2 unix/2.7.2.2 xhtml/3000.2.2.1
8.8.3 Cabal/3.0.1.0 array/0.5.4.0 base/4.13.0.0 binary/0.8.7.0 bytestring/0.10.10.0 containers/0.6.2.1 deepseq/1.4.4.0 directory/1.3.6.0 filepath/1.4.2.1 ghc/8.8.3* ghc-boot/8.8.3 ghc-boot-th/8.8.3 ghc-compact/0.1.0.0 ghc-heap/8.8.3 ghc-prim/0.5.3 ghci/8.8.3 haskeline/0.7.5.0 hpc/0.6.0.3 integer-gmp/1.0.2.0 libiserv/8.8.3 mtl/2.2.2 parsec/3.1.14.0 pretty/1.1.3.6 process/1.6.8.0 rts/1.0 stm/2.5.0.0 template-haskell/2.15.0.0 terminfo/0.4.1.4 text/1.2.4.0 time/1.9.3 transformers/0.5.6.2 unix/2.7.2.2 xhtml/3000.2.2.1
8.8.4 Cabal/3.0.1.0 array/0.5.4.0 base/4.13.0.0 binary/0.8.7.0 bytestring/0.10.10.1 containers/0.6.2.1 deepseq/1.4.4.0 directory/1.3.6.0 filepath/1.4.2.1 ghc/8.8.4* ghc-boot/8.8.4 ghc-boot-th/8.8.4 ghc-compact/0.1.0.0 ghc-heap/8.8.4 ghc-prim/0.5.3 ghci/8.8.4 haskeline/0.7.5.0 hpc/0.6.0.3 integer-gmp/1.0.2.0 libiserv/8.8.4 mtl/2.2.2 parsec/3.1.14.0 pretty/1.1.3.6 process/1.6.9.0 rts/1.0 stm/2.5.0.0 template-haskell/2.15.0.0 terminfo/0.4.1.4 text/1.2.4.0 time/1.9.3 transformers/0.5.6.2 unix/2.7.2.2 xhtml/3000.2.2.1
############################################
# GHC 8.10.x
8.10.1 Cabal/3.2.0.0 array/0.5.4.0 base/4.14.0.0 binary/0.8.8.0 bytestring/0.10.10.0 containers/0.6.2.1 deepseq/1.4.4.0 directory/1.3.6.0 exceptions/0.10.4 filepath/1.4.2.1 ghc/8.10.1* ghc-boot/8.10.1 ghc-boot-th/8.10.1 ghc-compact/0.1.0.0 ghc-heap/8.10.1 ghc-prim/0.6.1 ghci/8.10.1 haskeline/0.8.0.0 hpc/0.6.1.0 integer-gmp/1.0.3.0 libiserv/8.10.1 mtl/2.2.2 parsec/3.1.14.0 pretty/1.1.3.6 process/1.6.8.2 rts/1.0 stm/2.5.0.0 template-haskell/2.16.0.0 terminfo/0.4.1.4 text/1.2.3.2 time/1.9.3 transformers/0.5.6.2 unix/2.7.2.2 xhtml/3000.2.2.1
8.10.2 Cabal/3.2.0.0 array/0.5.4.0 base/4.14.1.0 binary/0.8.8.0 bytestring/0.10.10.0 containers/0.6.2.1 deepseq/1.4.4.0 directory/1.3.6.0 exceptions/0.10.4 filepath/1.4.2.1 ghc/8.10.2* ghc-boot/8.10.2 ghc-boot-th/8.10.2 ghc-compact/0.1.0.0 ghc-heap/8.10.2 ghc-prim/0.6.1 ghci/8.10.2 haskeline/0.8.0.1 hpc/0.6.1.0 integer-gmp/1.0.3.0 libiserv/8.10.2 mtl/2.2.2 parsec/3.1.14.0 pretty/1.1.3.6 process/1.6.9.0 rts/1.0 stm/2.5.0.0 template-haskell/2.16.0.0 terminfo/0.4.1.4 text/1.2.3.2 time/1.9.3 transformers/0.5.6.2 unix/2.7.2.2 xhtml/3000.2.2.1
8.10.3 Cabal/3.2.1.0 array/0.5.4.0 base/4.14.1.0 binary/0.8.8.0 bytestring/0.10.12.0 containers/0.6.2.1 deepseq/1.4.4.0 directory/1.3.6.0 exceptions/0.10.4 filepath/1.4.2.1 ghc/8.10.3* ghc-boot/8.10.3 ghc-boot-th/8.10.3 ghc-compact/0.1.0.0 ghc-heap/8.10.3 ghc-prim/0.6.1 ghci/8.10.3 haskeline/0.8.0.1 hpc/0.6.1.0 integer-gmp/1.0.3.0 libiserv/8.10.3 mtl/2.2.2 parsec/3.1.14.0 pretty/1.1.3.6 process/1.6.9.0 rts/1.0 stm/2.5.0.0 template-haskell/2.16.0.0 terminfo/0.4.1.4 text/1.2.4.1 time/1.9.3 transformers/0.5.6.2 unix/2.7.2.2 xhtml/3000.2.2.1
############################################
# GHC HEAD
HEAD Cabal/3.3.0.0 array/0.5.4.0 base/4.14.0.0 binary/0.8.7.0 bytestring/0.10.9.0 containers/0.6.2.1 deepseq/1.4.4.0 directory/1.3.6.0 exceptions/0.10.3 filepath/1.4.2.1 ghc/8.11.0.20200324* ghc-boot/8.11.0.20200324 ghc-boot-th/8.11.0.20200324 ghc-compact/0.1.0.0 ghc-heap/8.11.0.20200324 ghc-prim/0.6.1 ghci/8.11.0.20200324 haskeline/0.8.0.1 hpc/0.6.1.0 integer-gmp/1.0.2.0 libiserv/8.11.0.20200324 mtl/2.2.2 parsec/3.1.14.0 pretty/1.1.3.6 process/1.6.8.2 rts/1.0 stm/2.5.0.0 template-haskell/2.16.0.0 terminfo/0.4.1.4 text/1.2.3.1 time/1.9.3 transformers/0.5.6.2 unix/2.7.2.2 xhtml/3000.2.2.1
HEAD Cabal/3.3.0.0 array/0.5.4.0 base/4.15.0.0 binary/0.8.7.0 bytestring/0.10.10.0 containers/0.6.2.1 deepseq/1.4.4.0 directory/1.3.6.1 exceptions/0.10.4 filepath/1.4.2.1 ghc/8.11.0.20200805* ghc-bignum/1.0 ghc-boot/8.11.0.20200805 ghc-boot-th/8.11.0.20200805 ghc-compact/0.1.0.0 ghc-heap/8.11.0.20200805 ghc-prim/0.7.0 ghci/8.11.0.20200805 haskeline/0.8.0.1 hpc/0.6.1.0 integer-gmp/1.1 libiserv/8.11.0.20200805 mtl/2.2.2 parsec/3.1.14.0 pretty/1.1.3.6 process/1.6.10.0 rts/1.0 stm/2.5.0.0 template-haskell/2.17.0.0 terminfo/0.4.1.4 text/1.2.4.0 time/1.9.3 transformers/0.5.6.2 unix/2.7.2.2
......@@ -8,7 +8,7 @@ let
name = "enter-fhs";
targetPkgs = pkgs: with pkgs; [
# all
perl gcc binutils gnumake gmp ncurses git elfutils
perl gcc binutils gnumake gmp ncurses5 git elfutils
# source-release.sh
xlibs.lndir curl python3 which automake autoconf m4 file
haskell.compiler.ghc883 haskellPackages.happy haskellPackages.alex
......
......@@ -54,9 +54,10 @@ def list_submodules(repo: Path) -> List[Tuple[Path, str, str]]:
parts = line.split()
if len(parts) == 0:
continue
path = parts[1]
sha = parts[2]
rev = git_describe(repo, sha)
path = parts[0]
sha = parts[1]
rev = git_describe(path, sha)
result.append((path, sha, rev))
return result
......
......@@ -43,7 +43,7 @@ if [ -z "$ver" ]; then
if [ -z "$ver" ]; then echo "Failed to infer \$ver"; exit 1; fi
fi
host="downloads.haskell.org"
host="ghc@webhost.haskell.org"
usage() {
echo "Usage: [rel_name=<name>] ver=7.10.3-rc2 GHC_TREE=/path/to/ghc/tree $0 <action>"
......
{ pkgs ? (import <nixpkgs> {}) }:
let
ghc-events =
let
src = fetchGit {
url = "https://github.com/bgamari/ghc-events";
rev = "3d05b46547f777d90765bc03b81cc10fd49f6816";
ref = "ticky";
};
in pkgs.haskellPackages.callCabal2nix "ghc-events" src {};
threadscope =
let
src = fetchGit {
url = "https://github.com/bgamari/threadscope";
rev = "517eb7b631e9987997f413a97e9b766510aab34c";
};
in pkgs.haskell.lib.doJailbreak (pkgs.haskellPackages.callCabal2nix "threadscope" src { inherit ghc-events; });
in threadscope
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment