From 778b789c8ed44faadfb572c9a0eebb4e4a76a3aa Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Harboe?= Date: Wed, 1 Dec 2010 15:28:56 +0100 Subject: [PATCH] profile: use 100Hz as a default sampling frequency MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit it's a lie that is somewhere in the vicinity of the truth. Certainly 64MHz confuses gprof and produces zero output and no error messages. Signed-off-by: Øyvind Harboe --- src/target/target.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/target/target.c b/src/target/target.c index 93efa762..5cff9d08 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -3077,7 +3077,7 @@ static void writeGmon(uint32_t *samples, uint32_t sampleNum, const char *filenam int addressSpace = (max-min + 1); - static const uint32_t maxBuckets = 256 * 1024; /* maximum buckets. */ + static const uint32_t maxBuckets = 16 * 1024; /* maximum buckets. */ uint32_t length = addressSpace; if (length > maxBuckets) { @@ -3104,7 +3104,7 @@ static void writeGmon(uint32_t *samples, uint32_t sampleNum, const char *filenam writeLong(f, min); /* low_pc */ writeLong(f, max); /* high_pc */ writeLong(f, length); /* # of samples */ - writeLong(f, 64000000); /* 64MHz */ + writeLong(f, 100); /* KLUDGE! We lie, ca. 100Hz best case. */ writeString(f, "seconds"); for (i = 0; i < (15-strlen("seconds")); i++) writeData(f, &zero, 1); -- 2.39.5