Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a horrible bug in util.Enum that I introduced on Monday.
__hash__ and __eq__ have to match. That was my fault. However, I believe this exposed a bug in Python 2.7. It led some reason this led to non-determinism that depended on whether there's a .pyc file or not!!! There is a repro in test/unit.sh. Tested under multiple Python interpreter, and under GDB. (TODO later: investigate the root cause.) Simplify lookups keyed by Id -- use enum_value instead. Also: - Automate the re2c dependency. Upgrade to 1.0.3. - Got uftrace working on a stock Python interpreter! - Trace in Python too (benchmarks/pytrace.py).
- Loading branch information
Andy Chu
committed
Nov 25, 2017
1 parent
80a1974
commit 3cb2205
Showing
12 changed files
with
200 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ _tmp | |
_bin | ||
_build | ||
_devbuild | ||
_deps | ||
_release | ||
libc.so | ||
# Python build support | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
# | ||
# Usage: | ||
# ./uftrace.sh <function name> | ||
|
||
set -o nounset | ||
set -o pipefail | ||
set -o errexit | ||
|
||
#uftrace() { | ||
# ~/src/uftrace-0.8.1/uftrace "$@" | ||
#} | ||
|
||
python-demo() { | ||
uftrace _devbuild/cpython-instrumented/python -h | ||
} | ||
|
||
# https://github.com/namhyung/uftrace/wiki/Tutorial | ||
hello-demo() { | ||
cat >_tmp/hello.c <<EOF | ||
#include <stdio.h> | ||
int main(void) { | ||
printf("Hello world\n"); | ||
return 0; | ||
} | ||
EOF | ||
|
||
gcc -o _tmp/hello -pg _tmp/hello.c | ||
|
||
uftrace _tmp/hello | ||
} | ||
|
||
"$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters