projects
/
rrdtool.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
removed c++ comments //
[rrdtool.git]
/
src
/
rrd_open.c
diff --git
a/src/rrd_open.c
b/src/rrd_open.c
index
87fd766
..
d8c63b8
100644
(file)
--- a/
src/rrd_open.c
+++ b/
src/rrd_open.c
@@
-242,15
+242,10
@@
rrd_file_t *rrd_open(
__rrd_read(rrd->live_head, live_head_t,
1);
}
__rrd_read(rrd->live_head, live_head_t,
1);
}
-//XXX: This doesn't look like it needs madvise
__rrd_read(rrd->pdp_prep, pdp_prep_t,
rrd->stat_head->ds_cnt);
__rrd_read(rrd->pdp_prep, pdp_prep_t,
rrd->stat_head->ds_cnt);
-
-//XXX: This could benefit from madvise()ing
__rrd_read(rrd->cdp_prep, cdp_prep_t,
rrd->stat_head->rra_cnt * rrd->stat_head->ds_cnt);
__rrd_read(rrd->cdp_prep, cdp_prep_t,
rrd->stat_head->rra_cnt * rrd->stat_head->ds_cnt);
-
-//XXX: This could benefit from madvise()ing
__rrd_read(rrd->rra_ptr, rra_ptr_t,
rrd->stat_head->rra_cnt);
__rrd_read(rrd->rra_ptr, rra_ptr_t,
rrd->stat_head->rra_cnt);
@@
-268,6
+263,7
@@
rrd_file_t *rrd_open(
}
}
+#if defined DEBUG && DEBUG > 1
/* Print list of in-core pages of a the current rrd_file. */
static
void mincore_print(
/* Print list of in-core pages of a the current rrd_file. */
static
void mincore_print(
@@
-310,6
+306,7
@@
void mincore_print(
fprintf(stderr, "sorry mincore only works with mmap");
#endif
}
fprintf(stderr, "sorry mincore only works with mmap");
#endif
}
+#endif /* defined DEBUG && DEBUG > 1 */
/* drop cache except for the header and the active pages */
/* drop cache except for the header and the active pages */
@@
-417,7
+414,7
@@
off_t rrd_seek(
rrd_file->pos = ret;
#endif
/* mimic fseek, which returns 0 upon success */
rrd_file->pos = ret;
#endif
/* mimic fseek, which returns 0 upon success */
- return ret < 0; /
/XXX: or just ret to mimic lseek
+ return ret < 0; /
*XXX: or just ret to mimic lseek */
}
}