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
edc61860
Commit
edc61860
authored
Jun 05, 2015
by
Marius Wachtler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix compile error with memalloc stats or disabled stats
parent
05fb51ad
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
src/core/stats.h
src/core/stats.h
+3
-4
src/core/types.h
src/core/types.h
+2
-2
No files found.
src/core/stats.h
View file @
edc61860
...
@@ -92,8 +92,8 @@ struct Stats {
...
@@ -92,8 +92,8 @@ struct Stats {
static
void
setEnabled
(
bool
enabled
)
{}
static
void
setEnabled
(
bool
enabled
)
{}
static
void
dump
(
bool
includeZeros
=
true
)
{
printf
(
"(Stats disabled)
\n
"
);
}
static
void
dump
(
bool
includeZeros
=
true
)
{
printf
(
"(Stats disabled)
\n
"
);
}
static
void
clear
()
{}
static
void
clear
()
{}
static
void
log
(
int
id
,
int
count
=
1
)
{}
static
void
log
(
uint64_t
*
counter
,
int
count
=
1
)
{}
static
int
getStatId
(
const
std
::
string
&
name
)
{
return
0
;
}
static
uint64_t
*
getStatCounter
(
const
std
::
string
&
name
)
{
return
nullptr
;
}
static
void
endOfInit
()
{}
static
void
endOfInit
()
{}
};
};
struct
StatCounter
{
struct
StatCounter
{
...
@@ -200,8 +200,7 @@ public:
...
@@ -200,8 +200,7 @@ public:
};
};
#else
#else
struct
StatTimer
{
struct
StatTimer
{
StatTimer
(
int
statid
)
{}
StatTimer
(
uint64_t
*
)
{}
StatTimer
(
int
statid
,
uint64_t
at_time
)
{}
~
StatTimer
()
{}
~
StatTimer
()
{}
bool
isPaused
()
const
{
return
false
;
}
bool
isPaused
()
const
{
return
false
;
}
...
...
src/core/types.h
View file @
edc61860
...
@@ -524,8 +524,8 @@ extern "C" PyObject* PystonType_GenericAlloc(BoxedClass* cls, Py_ssize_t nitems)
...
@@ -524,8 +524,8 @@ extern "C" PyObject* PystonType_GenericAlloc(BoxedClass* cls, Py_ssize_t nitems)
if (cls->tp_name) { \
if (cls->tp_name) { \
std::string per_name_alloc_name = "alloc." + std::string(cls->tp_name); \
std::string per_name_alloc_name = "alloc." + std::string(cls->tp_name); \
std::string per_name_allocsize_name = "allocsize." + std::string(cls->tp_name); \
std::string per_name_allocsize_name = "allocsize." + std::string(cls->tp_name); \
Stats::log(Stats::getStat
Id(per_name_alloc_name));
\
Stats::log(Stats::getStat
Counter(per_name_alloc_name));
\
Stats::log(Stats::getStat
Id(per_name_allocsize_name), size);
\
Stats::log(Stats::getStat
Counter(per_name_allocsize_name), size);
\
}
}
#define ALLOC_STATS_VAR(cls) \
#define ALLOC_STATS_VAR(cls) \
if (cls->tp_name) { \
if (cls->tp_name) { \
...
...
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