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
bc73a3ab
Commit
bc73a3ab
authored
Jul 26, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some more exceptions stats
parent
63ec21c9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
+12
-0
src/codegen/unwinding.cpp
src/codegen/unwinding.cpp
+6
-0
src/runtime/cxx_unwind.cpp
src/runtime/cxx_unwind.cpp
+6
-0
No files found.
src/codegen/unwinding.cpp
View file @
bc73a3ab
...
...
@@ -604,6 +604,9 @@ static const LineInfo lineInfoForFrame(PythonFrameIteratorImpl* frame_it) {
}
void
exceptionCaughtInInterpreter
(
LineInfo
line_info
,
ExcInfo
*
exc_info
)
{
static
StatCounter
frames_unwound
(
"num_frames_unwound_python"
);
frames_unwound
.
log
();
// basically the same as PythonUnwindSession::addTraceback, but needs to
// be callable after an PythonUnwindSession has ended. The interpreter
// will call this from catch blocks if it needs to ensure that a
...
...
@@ -632,6 +635,9 @@ void unwindingThroughFrame(PythonUnwindSession* unwind_session, unw_cursor_t* cu
assert
(
!
unwind_session
->
shouldSkipFrame
());
unwind_session
->
setShouldSkipNextFrame
(
true
);
}
else
if
(
frameIsPythonFrame
(
ip
,
bp
,
cursor
,
&
frame_iter
))
{
static
StatCounter
frames_unwound
(
"num_frames_unwound_python"
);
frames_unwound
.
log
();
if
(
!
unwind_session
->
shouldSkipFrame
())
unwind_session
->
addTraceback
(
lineInfoForFrame
(
&
frame_iter
));
...
...
src/runtime/cxx_unwind.cpp
View file @
bc73a3ab
...
...
@@ -496,6 +496,9 @@ static inline void unwind_loop(ExcInfo* exc_data) {
while
(
unw_step
(
&
cursor
)
>
0
)
{
unw_proc_info_t
pip
;
static
StatCounter
frames_unwound
(
"num_frames_unwound_cxx"
);
frames_unwound
.
log
();
// NB. unw_get_proc_info is slow; a significant chunk of all time spent unwinding is spent here.
check
(
unw_get_proc_info
(
&
cursor
,
&
pip
));
...
...
@@ -668,6 +671,9 @@ static uint64_t* unwinding_stattimer = pyston::Stats::getStatCounter("us_timer_u
#endif
extern
"C"
void
__cxa_throw
(
void
*
exc_obj
,
std
::
type_info
*
tinfo
,
void
(
*
dtor
)(
void
*
))
{
static
pyston
::
StatCounter
num_cxa_throw
(
"num_cxa_throw"
);
num_cxa_throw
.
log
();
assert
(
!
pyston
::
in_cleanup_code
);
assert
(
exc_obj
);
RELEASE_ASSERT
(
tinfo
==
&
EXCINFO_TYPE_INFO
,
"can't throw a non-ExcInfo value! type info: %p"
,
tinfo
);
...
...
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