Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
Pyston
Commits
7d9da5ef
Commit
7d9da5ef
authored
Jul 20, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #663 from kmod/parsing_investigation
Add some more debugging for travis-ci builds
parents
9abf0b58
35767971
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
+19
-3
.travis.yml
.travis.yml
+6
-3
src/codegen/parser.cpp
src/codegen/parser.cpp
+13
-0
No files found.
.travis.yml
View file @
7d9da5ef
...
...
@@ -5,8 +5,11 @@ compiler:
-
gcc
env
:
-
TRAVIS_BUILD_TYPE=Debug
-
TRAVIS_BUILD_TYPE=Release
matrix
:
-
TRAVIS_BUILD_TYPE=Debug
-
TRAVIS_BUILD_TYPE=Release
global
:
-
PYSTON_RUN_ARGS=G
matrix
:
exclude
:
...
...
@@ -63,7 +66,7 @@ before_script:
script
:
-
ccache -z
-
PYSTON_RUN_ARGS=G
ninja -j4 pyston check-deps && ctest --output-on-failure
-
ninja -j4 pyston check-deps && ctest --output-on-failure
-
ccache -s
-
if [ -n "$(git status --porcelain --untracked=no)" ]; then echo "test suite left the source directory dirty"; git status;
false
; fi
...
...
src/codegen/parser.cpp
View file @
7d9da5ef
...
...
@@ -37,6 +37,8 @@
namespace
pyston
{
bool
DEBUG_PARSING
=
false
;
class
BufferedReader
{
private:
static
const
int
BUFSIZE
=
1024
;
...
...
@@ -1043,6 +1045,11 @@ static ParseResult _reparse(const char* fn, const std::string& cache_fn, AST_Mod
if
(
!
cache_fp
)
return
ParseResult
::
PYC_UNWRITABLE
;
if
(
DEBUG_PARSING
)
{
fprintf
(
stderr
,
"_reparse('%s', '%s'), pypa=%d
\n
"
,
fn
,
cache_fn
.
c_str
(),
ENABLE_PYPA_PARSER
);
fprintf
(
stderr
,
"writing magic string: %d %d %d %d
\n
"
,
getMagic
()[
0
],
getMagic
()[
1
],
getMagic
()[
2
],
getMagic
()[
3
]);
}
fwrite
(
getMagic
(),
1
,
MAGIC_STRING_LENGTH
,
cache_fp
);
int
checksum_start
=
ftell
(
cache_fp
);
...
...
@@ -1094,6 +1101,9 @@ static ParseResult _reparse(const char* fn, const std::string& cache_fn, AST_Mod
// it's not a huge deal right now, but this caching version can significantly cut down
// on the startup time (40ms -> 10ms).
AST_Module
*
caching_parse_file
(
const
char
*
fn
)
{
if
(
DEBUG_PARSING
)
{
fprintf
(
stderr
,
"caching_parse_file('%s'), pypa=%d
\n
"
,
fn
,
ENABLE_PYPA_PARSER
);
}
UNAVOIDABLE_STAT_TIMER
(
t0
,
"us_timer_caching_parse_file"
);
static
StatCounter
us_parsing
(
"us_parsing"
);
Timer
_t
(
"parsing"
);
...
...
@@ -1214,6 +1224,9 @@ AST_Module* caching_parse_file(const char* fn) {
assert
(
!
good
);
tries
++
;
RELEASE_ASSERT
(
tries
<=
MAX_TRIES
,
"repeatedly failing to parse file"
);
if
(
tries
==
MAX_TRIES
)
DEBUG_PARSING
=
true
;
if
(
!
good
)
{
assert
(
!
fp
);
file_data
.
clear
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment