From 8d6d940c3a17249656045bb96b7128d536a6522d Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Villemain?= Date: Tue, 29 Dec 2009 00:11:34 +0100 Subject: [PATCH] add number of blocks loaded from _mincore --- pgfincore.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pgfincore.c b/pgfincore.c index 30a4b08..989ded6 100644 --- a/pgfincore.c +++ b/pgfincore.c @@ -463,6 +463,7 @@ pgfadv_snapshot(char *filename, int fd, int action) int blockNum = 0; unsigned int c; unsigned int count = 0; + unsigned int gcount = 0; /* * We handle the effective_io_concurrency... */ @@ -481,6 +482,7 @@ pgfadv_snapshot(char *filename, int fd, int action) if (c & 01) { count++; + gcount++; if (count == effective_io_concurrency) { posix_fadvise(fd, ((blockNum-count)*pageSize), count*pageSize, POSIX_FADV_WILLNEED); @@ -491,7 +493,8 @@ pgfadv_snapshot(char *filename, int fd, int action) if (count) posix_fadvise(fd, ((blockNum-count)*pageSize), count*pageSize, POSIX_FADV_WILLNEED); fclose(f); + elog(DEBUG1, "pgfadv_snapshot: loading %d blocks from relpath %s", gcount, filename); break; } - return 0; + return gcount; } \ No newline at end of file -- 2.39.5