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
215f52d2
Commit
215f52d2
authored
Jun 16, 2015
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some simple exceptions stats
parent
873ac0df
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
src/core/stats.h
src/core/stats.h
+4
-3
src/runtime/stacktrace.cpp
src/runtime/stacktrace.cpp
+9
-0
No files found.
src/core/stats.h
View file @
215f52d2
...
...
@@ -28,9 +28,10 @@ namespace pyston {
#define DISABLE_STATS 0
#define STAT_ALLOCATIONS 0 && !DISABLE_STATS
#define STAT_TIMERS 0 && !DISABLE_STATS
#define EXPENSIVE_STAT_TIMERS 0 && STAT_TIMERS
#define STAT_ALLOCATIONS (0 && !DISABLE_STATS)
#define STAT_EXCEPTIONS (0 && !DISABLE_STATS)
#define STAT_TIMERS (0 && !DISABLE_STATS)
#define EXPENSIVE_STAT_TIMERS (0 && STAT_TIMERS)
#if STAT_TIMERS
#define STAT_TIMER(id, name) \
...
...
src/runtime/stacktrace.cpp
View file @
215f52d2
...
...
@@ -57,6 +57,15 @@ void raiseRaw(const ExcInfo& e) {
assert
(
gc
::
isValidGCObject
(
e
.
value
));
assert
(
gc
::
isValidGCObject
(
e
.
traceback
));
#if STAT_EXCEPTIONS
std
::
string
stat_name
;
if
(
PyType_Check
(
e
.
type
))
stat_name
=
"num_exceptions_"
+
std
::
string
(
static_cast
<
BoxedClass
*>
(
e
.
type
)
->
tp_name
);
else
stat_name
=
"num_exceptions_"
+
std
::
string
(
e
.
value
->
cls
->
tp_name
);
Stats
::
log
(
Stats
::
getStatCounter
(
stat_name
));
#endif
throw
e
;
}
...
...
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