From 2f14f5ee995380c9619c9c9c1a4385fd36750fd3 Mon Sep 17 00:00:00 2001 From: Ingo Weinhold Date: Mon, 21 Jul 2008 00:30:16 +0000 Subject: [PATCH] axeld + bonefish + mmlr: * Added trace entry for block reads from disk. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26534 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/system/kernel/cache/block_cache.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/system/kernel/cache/block_cache.cpp b/src/system/kernel/cache/block_cache.cpp index f7c10f164a..b10e23cac9 100644 --- a/src/system/kernel/cache/block_cache.cpp +++ b/src/system/kernel/cache/block_cache.cpp @@ -225,6 +225,17 @@ public: virtual const char* _Action() const { return "put"; } }; +class Read : public Action { +public: + Read(block_cache *cache, cached_block* block) + : Action(cache, block) + { + Initialized(); + } + + virtual const char* _Action() const { return "read"; } +}; + class Write : public Action { public: Write(block_cache *cache, cached_block* block) @@ -1123,6 +1134,7 @@ get_cached_block(block_cache *cache, off_t blockNumber, bool *_allocated, blockNumber, bytesRead, strerror(errno))); return NULL; } + TB(Read(cache, block)); } if (block->unused) {