summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorØyvind Harboe <oyvind.harboe@zylin.com>2010-12-01 15:28:56 +0100
committerØyvind Harboe <oyvind.harboe@zylin.com>2010-12-01 15:28:56 +0100
commit778b789c8ed44faadfb572c9a0eebb4e4a76a3aa (patch)
treef419cf3ad1bae4451b7449c12798a632726a1a3b
parent40a93104d58c319e9ee7c4e8764adbdfa460d790 (diff)
downloadopenocd+libswd-778b789c8ed44faadfb572c9a0eebb4e4a76a3aa.tar.gz
openocd+libswd-778b789c8ed44faadfb572c9a0eebb4e4a76a3aa.tar.bz2
openocd+libswd-778b789c8ed44faadfb572c9a0eebb4e4a76a3aa.tar.xz
openocd+libswd-778b789c8ed44faadfb572c9a0eebb4e4a76a3aa.zip
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 <oyvind.harboe@zylin.com>
-rw-r--r--src/target/target.c4
1 files 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);