From: Øyvind Harboe Date: Wed, 1 Dec 2010 14:28:56 +0000 (+0100) Subject: profile: use 100Hz as a default sampling frequency X-Git-Tag: v0.5.0-rc1~303 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=778b789c8ed44faadfb572c9a0eebb4e4a76a3aa;p=openocd profile: use 100Hz as a default sampling frequency 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 --- 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);