Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
ec4e9709
Commit
ec4e9709
authored
Jul 18, 1997
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added reporting method for use during debugging.
parent
a6acfe63
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
126 additions
and
12 deletions
+126
-12
src/Persistence/cPickleCache.c
src/Persistence/cPickleCache.c
+42
-4
src/ZODB/cPickleCache.c
src/ZODB/cPickleCache.c
+42
-4
src/persistent/cPickleCache.c
src/persistent/cPickleCache.c
+42
-4
No files found.
src/Persistence/cPickleCache.c
View file @
ec4e9709
/*
/*
$Id: cPickleCache.c,v 1.
9 1997/07/16 20:18:40
jim Exp $
$Id: cPickleCache.c,v 1.
10 1997/07/18 14:30:18
jim Exp $
C implementation of a pickle jar cache.
C implementation of a pickle jar cache.
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
(540) 371-6909
(540) 371-6909
***************************************************************************/
***************************************************************************/
static
char
*
what_string
=
"$Id: cPickleCache.c,v 1.
9 1997/07/16 20:18:40
jim Exp $"
;
static
char
*
what_string
=
"$Id: cPickleCache.c,v 1.
10 1997/07/18 14:30:18
jim Exp $"
;
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
#define UNLESS(E) if(!(E))
...
@@ -350,6 +350,41 @@ cc_reallyfull_sweep(ccobject *self, PyObject *args)
...
@@ -350,6 +350,41 @@ cc_reallyfull_sweep(ccobject *self, PyObject *args)
return
Py_None
;
return
Py_None
;
}
}
static
PyObject
*
cc_report
(
ccobject
*
self
,
PyObject
*
args
)
{
PyObject
*
key
,
*
v
,
*
t
=
0
;
int
i
;
if
(
args
)
PyArg_ParseTuple
(
args
,
"|O"
,
&
t
);
for
(
i
=
0
;
PyDict_Next
(
self
->
data
,
&
i
,
&
key
,
&
v
);
)
{
if
(
v
->
ob_type
==
(
PyTypeObject
*
)
PATimeType
&&
(
(
t
&&
((
PATimeobject
*
)
v
)
->
object
->
ob_type
==
t
)
||
!
t
))
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\t
%ld
\n
"
,
(((
PATimeobject
*
)
v
)
->
object
->
oid
),
((
PATimeobject
*
)
v
)
->
object
,
((
PATimeobject
*
)
v
)
->
object
->
ob_type
->
tp_name
,
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
ob_refcnt
),
(((
PATimeobject
*
)
v
)
->
object
->
state
),
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
atime
)
);
else
if
((
t
&&
((
PATimeobject
*
)
v
)
->
object
->
ob_type
==
t
)
||
!
t
)
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\n
"
,
(((
cPersistentObject
*
)
v
)
->
oid
),
v
,
v
->
ob_type
->
tp_name
,
(
long
)(
v
->
ob_refcnt
),
(((
cPersistentObject
*
)
v
)
->
state
)
);
}
if
(
args
)
Py_INCREF
(
Py_None
);
return
Py_None
;
}
static
struct
PyMethodDef
cc_methods
[]
=
{
static
struct
PyMethodDef
cc_methods
[]
=
{
{
"full_sweep"
,
(
PyCFunction
)
cc_full_sweep
,
1
,
{
"full_sweep"
,
(
PyCFunction
)
cc_full_sweep
,
1
,
"full_sweep([age]) -- Perform a full sweep of the cache
\n\n
"
"full_sweep([age]) -- Perform a full sweep of the cache
\n\n
"
...
@@ -358,6 +393,7 @@ static struct PyMethodDef cc_methods[] = {
...
@@ -358,6 +393,7 @@ static struct PyMethodDef cc_methods[] = {
"accessed in the number of seconds given by 'age'. "
"accessed in the number of seconds given by 'age'. "
"'age defaults to the cache age.
\n
"
"'age defaults to the cache age.
\n
"
},
},
{
"report"
,
(
PyCFunction
)
cc_report
,
1
,
""
},
{
"minimize"
,
(
PyCFunction
)
cc_reallyfull_sweep
,
1
,
{
"minimize"
,
(
PyCFunction
)
cc_reallyfull_sweep
,
1
,
"minimize([age]) -- Remove as many objects as possible
\n\n
"
"minimize([age]) -- Remove as many objects as possible
\n\n
"
"Make multiple passes through the cache, removing any objects that are no
\n
"
"Make multiple passes through the cache, removing any objects that are no
\n
"
...
@@ -401,7 +437,6 @@ newccobject(int cache_size, int cache_age)
...
@@ -401,7 +437,6 @@ newccobject(int cache_size, int cache_age)
return
NULL
;
return
NULL
;
}
}
static
void
static
void
cc_dealloc
(
ccobject
*
self
)
cc_dealloc
(
ccobject
*
self
)
{
{
...
@@ -620,7 +655,7 @@ void
...
@@ -620,7 +655,7 @@ void
initcPickleCache
()
initcPickleCache
()
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.
9
$"
;
char
*
rev
=
"$Revision: 1.
10
$"
;
Cctype
.
ob_type
=&
PyType_Type
;
Cctype
.
ob_type
=&
PyType_Type
;
...
@@ -648,6 +683,9 @@ initcPickleCache()
...
@@ -648,6 +683,9 @@ initcPickleCache()
/******************************************************************************
/******************************************************************************
$Log: cPickleCache.c,v $
$Log: cPickleCache.c,v $
Revision 1.10 1997/07/18 14:30:18 jim
Added reporting method for use during debugging.
Revision 1.9 1997/07/16 20:18:40 jim
Revision 1.9 1997/07/16 20:18:40 jim
*** empty log message ***
*** empty log message ***
...
...
src/ZODB/cPickleCache.c
View file @
ec4e9709
/*
/*
$Id: cPickleCache.c,v 1.
9 1997/07/16 20:18:40
jim Exp $
$Id: cPickleCache.c,v 1.
10 1997/07/18 14:30:18
jim Exp $
C implementation of a pickle jar cache.
C implementation of a pickle jar cache.
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
(540) 371-6909
(540) 371-6909
***************************************************************************/
***************************************************************************/
static
char
*
what_string
=
"$Id: cPickleCache.c,v 1.
9 1997/07/16 20:18:40
jim Exp $"
;
static
char
*
what_string
=
"$Id: cPickleCache.c,v 1.
10 1997/07/18 14:30:18
jim Exp $"
;
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
#define UNLESS(E) if(!(E))
...
@@ -350,6 +350,41 @@ cc_reallyfull_sweep(ccobject *self, PyObject *args)
...
@@ -350,6 +350,41 @@ cc_reallyfull_sweep(ccobject *self, PyObject *args)
return
Py_None
;
return
Py_None
;
}
}
static
PyObject
*
cc_report
(
ccobject
*
self
,
PyObject
*
args
)
{
PyObject
*
key
,
*
v
,
*
t
=
0
;
int
i
;
if
(
args
)
PyArg_ParseTuple
(
args
,
"|O"
,
&
t
);
for
(
i
=
0
;
PyDict_Next
(
self
->
data
,
&
i
,
&
key
,
&
v
);
)
{
if
(
v
->
ob_type
==
(
PyTypeObject
*
)
PATimeType
&&
(
(
t
&&
((
PATimeobject
*
)
v
)
->
object
->
ob_type
==
t
)
||
!
t
))
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\t
%ld
\n
"
,
(((
PATimeobject
*
)
v
)
->
object
->
oid
),
((
PATimeobject
*
)
v
)
->
object
,
((
PATimeobject
*
)
v
)
->
object
->
ob_type
->
tp_name
,
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
ob_refcnt
),
(((
PATimeobject
*
)
v
)
->
object
->
state
),
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
atime
)
);
else
if
((
t
&&
((
PATimeobject
*
)
v
)
->
object
->
ob_type
==
t
)
||
!
t
)
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\n
"
,
(((
cPersistentObject
*
)
v
)
->
oid
),
v
,
v
->
ob_type
->
tp_name
,
(
long
)(
v
->
ob_refcnt
),
(((
cPersistentObject
*
)
v
)
->
state
)
);
}
if
(
args
)
Py_INCREF
(
Py_None
);
return
Py_None
;
}
static
struct
PyMethodDef
cc_methods
[]
=
{
static
struct
PyMethodDef
cc_methods
[]
=
{
{
"full_sweep"
,
(
PyCFunction
)
cc_full_sweep
,
1
,
{
"full_sweep"
,
(
PyCFunction
)
cc_full_sweep
,
1
,
"full_sweep([age]) -- Perform a full sweep of the cache
\n\n
"
"full_sweep([age]) -- Perform a full sweep of the cache
\n\n
"
...
@@ -358,6 +393,7 @@ static struct PyMethodDef cc_methods[] = {
...
@@ -358,6 +393,7 @@ static struct PyMethodDef cc_methods[] = {
"accessed in the number of seconds given by 'age'. "
"accessed in the number of seconds given by 'age'. "
"'age defaults to the cache age.
\n
"
"'age defaults to the cache age.
\n
"
},
},
{
"report"
,
(
PyCFunction
)
cc_report
,
1
,
""
},
{
"minimize"
,
(
PyCFunction
)
cc_reallyfull_sweep
,
1
,
{
"minimize"
,
(
PyCFunction
)
cc_reallyfull_sweep
,
1
,
"minimize([age]) -- Remove as many objects as possible
\n\n
"
"minimize([age]) -- Remove as many objects as possible
\n\n
"
"Make multiple passes through the cache, removing any objects that are no
\n
"
"Make multiple passes through the cache, removing any objects that are no
\n
"
...
@@ -401,7 +437,6 @@ newccobject(int cache_size, int cache_age)
...
@@ -401,7 +437,6 @@ newccobject(int cache_size, int cache_age)
return
NULL
;
return
NULL
;
}
}
static
void
static
void
cc_dealloc
(
ccobject
*
self
)
cc_dealloc
(
ccobject
*
self
)
{
{
...
@@ -620,7 +655,7 @@ void
...
@@ -620,7 +655,7 @@ void
initcPickleCache
()
initcPickleCache
()
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.
9
$"
;
char
*
rev
=
"$Revision: 1.
10
$"
;
Cctype
.
ob_type
=&
PyType_Type
;
Cctype
.
ob_type
=&
PyType_Type
;
...
@@ -648,6 +683,9 @@ initcPickleCache()
...
@@ -648,6 +683,9 @@ initcPickleCache()
/******************************************************************************
/******************************************************************************
$Log: cPickleCache.c,v $
$Log: cPickleCache.c,v $
Revision 1.10 1997/07/18 14:30:18 jim
Added reporting method for use during debugging.
Revision 1.9 1997/07/16 20:18:40 jim
Revision 1.9 1997/07/16 20:18:40 jim
*** empty log message ***
*** empty log message ***
...
...
src/persistent/cPickleCache.c
View file @
ec4e9709
/*
/*
$Id: cPickleCache.c,v 1.
9 1997/07/16 20:18:40
jim Exp $
$Id: cPickleCache.c,v 1.
10 1997/07/18 14:30:18
jim Exp $
C implementation of a pickle jar cache.
C implementation of a pickle jar cache.
...
@@ -56,7 +56,7 @@
...
@@ -56,7 +56,7 @@
(540) 371-6909
(540) 371-6909
***************************************************************************/
***************************************************************************/
static
char
*
what_string
=
"$Id: cPickleCache.c,v 1.
9 1997/07/16 20:18:40
jim Exp $"
;
static
char
*
what_string
=
"$Id: cPickleCache.c,v 1.
10 1997/07/18 14:30:18
jim Exp $"
;
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
#define UNLESS(E) if(!(E))
...
@@ -350,6 +350,41 @@ cc_reallyfull_sweep(ccobject *self, PyObject *args)
...
@@ -350,6 +350,41 @@ cc_reallyfull_sweep(ccobject *self, PyObject *args)
return
Py_None
;
return
Py_None
;
}
}
static
PyObject
*
cc_report
(
ccobject
*
self
,
PyObject
*
args
)
{
PyObject
*
key
,
*
v
,
*
t
=
0
;
int
i
;
if
(
args
)
PyArg_ParseTuple
(
args
,
"|O"
,
&
t
);
for
(
i
=
0
;
PyDict_Next
(
self
->
data
,
&
i
,
&
key
,
&
v
);
)
{
if
(
v
->
ob_type
==
(
PyTypeObject
*
)
PATimeType
&&
(
(
t
&&
((
PATimeobject
*
)
v
)
->
object
->
ob_type
==
t
)
||
!
t
))
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\t
%ld
\n
"
,
(((
PATimeobject
*
)
v
)
->
object
->
oid
),
((
PATimeobject
*
)
v
)
->
object
,
((
PATimeobject
*
)
v
)
->
object
->
ob_type
->
tp_name
,
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
ob_refcnt
),
(((
PATimeobject
*
)
v
)
->
object
->
state
),
(
long
)(((
PATimeobject
*
)
v
)
->
object
->
atime
)
);
else
if
((
t
&&
((
PATimeobject
*
)
v
)
->
object
->
ob_type
==
t
)
||
!
t
)
printf
(
"%d
\t
%p
\t
%s
\t
%ld
\t
%d
\n
"
,
(((
cPersistentObject
*
)
v
)
->
oid
),
v
,
v
->
ob_type
->
tp_name
,
(
long
)(
v
->
ob_refcnt
),
(((
cPersistentObject
*
)
v
)
->
state
)
);
}
if
(
args
)
Py_INCREF
(
Py_None
);
return
Py_None
;
}
static
struct
PyMethodDef
cc_methods
[]
=
{
static
struct
PyMethodDef
cc_methods
[]
=
{
{
"full_sweep"
,
(
PyCFunction
)
cc_full_sweep
,
1
,
{
"full_sweep"
,
(
PyCFunction
)
cc_full_sweep
,
1
,
"full_sweep([age]) -- Perform a full sweep of the cache
\n\n
"
"full_sweep([age]) -- Perform a full sweep of the cache
\n\n
"
...
@@ -358,6 +393,7 @@ static struct PyMethodDef cc_methods[] = {
...
@@ -358,6 +393,7 @@ static struct PyMethodDef cc_methods[] = {
"accessed in the number of seconds given by 'age'. "
"accessed in the number of seconds given by 'age'. "
"'age defaults to the cache age.
\n
"
"'age defaults to the cache age.
\n
"
},
},
{
"report"
,
(
PyCFunction
)
cc_report
,
1
,
""
},
{
"minimize"
,
(
PyCFunction
)
cc_reallyfull_sweep
,
1
,
{
"minimize"
,
(
PyCFunction
)
cc_reallyfull_sweep
,
1
,
"minimize([age]) -- Remove as many objects as possible
\n\n
"
"minimize([age]) -- Remove as many objects as possible
\n\n
"
"Make multiple passes through the cache, removing any objects that are no
\n
"
"Make multiple passes through the cache, removing any objects that are no
\n
"
...
@@ -401,7 +437,6 @@ newccobject(int cache_size, int cache_age)
...
@@ -401,7 +437,6 @@ newccobject(int cache_size, int cache_age)
return
NULL
;
return
NULL
;
}
}
static
void
static
void
cc_dealloc
(
ccobject
*
self
)
cc_dealloc
(
ccobject
*
self
)
{
{
...
@@ -620,7 +655,7 @@ void
...
@@ -620,7 +655,7 @@ void
initcPickleCache
()
initcPickleCache
()
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.
9
$"
;
char
*
rev
=
"$Revision: 1.
10
$"
;
Cctype
.
ob_type
=&
PyType_Type
;
Cctype
.
ob_type
=&
PyType_Type
;
...
@@ -648,6 +683,9 @@ initcPickleCache()
...
@@ -648,6 +683,9 @@ initcPickleCache()
/******************************************************************************
/******************************************************************************
$Log: cPickleCache.c,v $
$Log: cPickleCache.c,v $
Revision 1.10 1997/07/18 14:30:18 jim
Added reporting method for use during debugging.
Revision 1.9 1997/07/16 20:18:40 jim
Revision 1.9 1997/07/16 20:18:40 jim
*** empty log message ***
*** empty log message ***
...
...
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