Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
ace06542
Commit
ace06542
authored
Jan 07, 2010
by
antirez
Browse files
Now DEBUG OBJECT plays well with swapped out objects
parent
0841cc92
Changes
1
Hide whitespace changes
Inline
Side-by-side
redis.c
View file @
ace06542
...
...
@@ -7175,10 +7175,19 @@ static void debugCommand(redisClient *c) {
}
key
=
dictGetEntryKey
(
de
);
val
=
dictGetEntryVal
(
de
);
addReplySds
(
c
,
sdscatprintf
(
sdsempty
(),
"+Key at:%p refcount:%d, value at:%p refcount:%d encoding:%d serializedlength:%lld
\r\n
"
,
if
(
server
.
vm_enabled
&&
key
->
storage
==
REDIS_VM_MEMORY
)
{
addReplySds
(
c
,
sdscatprintf
(
sdsempty
(),
"+Key at:%p refcount:%d, value at:%p refcount:%d "
"encoding:%d serializedlength:%lld
\r\n
"
,
(
void
*
)
key
,
key
->
refcount
,
(
void
*
)
val
,
val
->
refcount
,
val
->
encoding
,
rdbSavedObjectLen
(
val
)));
}
else
{
addReplySds
(
c
,
sdscatprintf
(
sdsempty
(),
"+Key at:%p refcount:%d, value swapped at: page %llu "
"using %llu pages
\r\n
"
,
(
void
*
)
key
,
key
->
refcount
,
(
unsigned
long
long
)
key
->
vm
.
page
,
(
unsigned
long
long
)
key
->
vm
.
usedpages
));
}
}
else
if
(
!
strcasecmp
(
c
->
argv
[
1
]
->
ptr
,
"swapout"
)
&&
c
->
argc
==
3
)
{
dictEntry
*
de
=
dictFind
(
c
->
db
->
dict
,
c
->
argv
[
2
]);
robj
*
key
,
*
val
;
...
...
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