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
9ebed7cf
Commit
9ebed7cf
authored
Feb 22, 2010
by
antirez
Browse files
Fixed 32bit make target to work on Linux out of the box
parent
12d090d2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Makefile
View file @
9ebed7cf
...
@@ -79,7 +79,10 @@ log:
...
@@ -79,7 +79,10 @@ log:
git log
'--pretty=format:%ad %s'
--date
=
short
>
Changelog
git log
'--pretty=format:%ad %s'
--date
=
short
>
Changelog
32bit
:
32bit
:
make
ARCH
=
"-arch i386"
@
echo
""
@
echo
"WARNING: if it fails under Linux you probably need to install libc6-dev-i386"
@
echo
""
make
ARCH
=
"-m32"
gprof
:
gprof
:
make
PROF
=
"-pg"
make
PROF
=
"-pg"
...
...
redis.c
View file @
9ebed7cf
...
@@ -7406,7 +7406,7 @@ static int vmWriteObjectOnSwap(robj *o, off_t page) {
...
@@ -7406,7 +7406,7 @@ static int vmWriteObjectOnSwap(robj *o, off_t page) {
if
(
fseeko
(
server
.
vm_fp
,
page
*
server
.
vm_page_size
,
SEEK_SET
)
==
-
1
)
{
if
(
fseeko
(
server
.
vm_fp
,
page
*
server
.
vm_page_size
,
SEEK_SET
)
==
-
1
)
{
if
(
server
.
vm_enabled
)
pthread_mutex_unlock
(
&
server
.
io_swapfile_mutex
);
if
(
server
.
vm_enabled
)
pthread_mutex_unlock
(
&
server
.
io_swapfile_mutex
);
redisLog
(
REDIS_WARNING
,
redisLog
(
REDIS_WARNING
,
"Critical VM problem in vm
Swap
Object
Blocking
(): can't seek: %s"
,
"Critical VM problem in vm
Write
Object
OnSwap
(): can't seek: %s"
,
strerror
(
errno
));
strerror
(
errno
));
return
REDIS_ERR
;
return
REDIS_ERR
;
}
}
...
@@ -7922,8 +7922,8 @@ static void *IOThreadEntryPoint(void *arg) {
...
@@ -7922,8 +7922,8 @@ static void *IOThreadEntryPoint(void *arg) {
lockThreadedIO
();
lockThreadedIO
();
if
(
listLength
(
server
.
io_newjobs
)
==
0
)
{
if
(
listLength
(
server
.
io_newjobs
)
==
0
)
{
/* No new jobs in queue, exit. */
/* No new jobs in queue, exit. */
redisLog
(
REDIS_DEBUG
,
"Thread %
l
ld exiting, nothing to do"
,
redisLog
(
REDIS_DEBUG
,
"Thread %ld exiting, nothing to do"
,
(
long
long
)
pthread_self
());
(
long
)
pthread_self
());
server
.
io_active_threads
--
;
server
.
io_active_threads
--
;
unlockThreadedIO
();
unlockThreadedIO
();
return
NULL
;
return
NULL
;
...
@@ -7936,8 +7936,8 @@ static void *IOThreadEntryPoint(void *arg) {
...
@@ -7936,8 +7936,8 @@ static void *IOThreadEntryPoint(void *arg) {
listAddNodeTail
(
server
.
io_processing
,
j
);
listAddNodeTail
(
server
.
io_processing
,
j
);
ln
=
listLast
(
server
.
io_processing
);
/* We use ln later to remove it */
ln
=
listLast
(
server
.
io_processing
);
/* We use ln later to remove it */
unlockThreadedIO
();
unlockThreadedIO
();
redisLog
(
REDIS_DEBUG
,
"Thread %
l
ld got a new job (type %d): %p about key '%s'"
,
redisLog
(
REDIS_DEBUG
,
"Thread %ld got a new job (type %d): %p about key '%s'"
,
(
long
long
)
pthread_self
(),
j
->
type
,
(
void
*
)
j
,
(
char
*
)
j
->
key
->
ptr
);
(
long
)
pthread_self
(),
j
->
type
,
(
void
*
)
j
,
(
char
*
)
j
->
key
->
ptr
);
/* Process the Job */
/* Process the Job */
if
(
j
->
type
==
REDIS_IOJOB_LOAD
)
{
if
(
j
->
type
==
REDIS_IOJOB_LOAD
)
{
...
@@ -7952,8 +7952,8 @@ static void *IOThreadEntryPoint(void *arg) {
...
@@ -7952,8 +7952,8 @@ static void *IOThreadEntryPoint(void *arg) {
}
}
/* Done: insert the job into the processed queue */
/* Done: insert the job into the processed queue */
redisLog
(
REDIS_DEBUG
,
"Thread %
l
ld completed the job: %p (key %s)"
,
redisLog
(
REDIS_DEBUG
,
"Thread %ld completed the job: %p (key %s)"
,
(
long
long
)
pthread_self
(),
(
void
*
)
j
,
(
char
*
)
j
->
key
->
ptr
);
(
long
)
pthread_self
(),
(
void
*
)
j
,
(
char
*
)
j
->
key
->
ptr
);
lockThreadedIO
();
lockThreadedIO
();
listDelNode
(
server
.
io_processing
,
ln
);
listDelNode
(
server
.
io_processing
,
ln
);
listAddNodeTail
(
server
.
io_processed
,
j
);
listAddNodeTail
(
server
.
io_processed
,
j
);
...
...
test-redis.tcl
View file @
9ebed7cf
...
@@ -952,6 +952,7 @@ proc main {server port} {
...
@@ -952,6 +952,7 @@ proc main {server port} {
$r sort tosort
{
DESC
}
$r sort tosort
{
DESC
}
}
[
lsort -decreasing -integer $res
]
}
[
lsort -decreasing -integer $res
]
while 1
{
test
{
SORT speed, sorting 10000 elements list using BY, 100 times
}
{
test
{
SORT speed, sorting 10000 elements list using BY, 100 times
}
{
set start
[
clock clicks -milliseconds
]
set start
[
clock clicks -milliseconds
]
for
{
set i 0
}
{
$i
< 100
}
{
incr i
}
{
for
{
set i 0
}
{
$i
< 100
}
{
incr i
}
{
...
@@ -962,7 +963,7 @@ proc main {server port} {
...
@@ -962,7 +963,7 @@ proc main {server port} {
flush stdout
flush stdout
format
{}
format
{}
}
{}
}
{}
}
test
{
SORT speed, sorting 10000 elements list directly, 100 times
}
{
test
{
SORT speed, sorting 10000 elements list directly, 100 times
}
{
set start
[
clock clicks -milliseconds
]
set start
[
clock clicks -milliseconds
]
for
{
set i 0
}
{
$i
< 100
}
{
incr i
}
{
for
{
set i 0
}
{
$i
< 100
}
{
incr i
}
{
...
...
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