From: "Jon Beniston" <jbeniston@compxs.com>
To: <gdb-patches@sources.redhat.com>
Subject: [PATCH] Output execution stats from ARM simulator
Date: Mon, 29 Nov 2004 14:39:00 -0000 [thread overview]
Message-ID: <001d01c4d620$edbb9e50$0bbda8c0@Kindrogan> (raw)
[-- Attachment #1: Type: text/plain, Size: 304 bytes --]
Hi,
The attached patch outputs the number of instructions executed and the
number of cycles taken by the ARM simulator.
Cheers,
Jon
2004-11-29 Jon Beniston <jon@beniston.com>
* wrapper.c (sim_info): Output number of instructions
executed and number of cycles taken to execute them.
[-- Attachment #2: sim_info.patch --]
[-- Type: application/octet-stream, Size: 1352 bytes --]
Index: wrapper.c
===================================================================
RCS file: /cvs/src/src/sim/arm/wrapper.c,v
retrieving revision 1.27
diff -c -p -r1.27 wrapper.c
*** wrapper.c 30 Mar 2003 10:39:22 -0000 1.27
--- wrapper.c 29 Nov 2004 14:34:13 -0000
*************** sim_create_inferior (sd, abfd, argv, env
*** 398,405 ****
void
sim_info (sd, verbose)
SIM_DESC sd ATTRIBUTE_UNUSED;
! int verbose ATTRIBUTE_UNUSED;
{
}
static int
--- 398,415 ----
void
sim_info (sd, verbose)
SIM_DESC sd ATTRIBUTE_UNUSED;
! int verbose;
{
+ (*sim_callback->printf_filtered) (sim_callback, "Instructions executed: %d\n", state->NumInstrs);
+ if (verbose)
+ {
+ (*sim_callback->printf_filtered) (sim_callback, "S cycles: %d\n", state->NumScycles);
+ (*sim_callback->printf_filtered) (sim_callback, "N cycles: %d\n", state->NumNcycles);
+ (*sim_callback->printf_filtered) (sim_callback, "I cycles: %d\n", state->NumIcycles);
+ (*sim_callback->printf_filtered) (sim_callback, "C cycles: %d\n", state->NumCcycles);
+ (*sim_callback->printf_filtered) (sim_callback, "F cycles: %d\n", state->NumFcycles);
+ }
+ (*sim_callback->printf_filtered) (sim_callback, "Total cycles: %d\n", ARMul_Time (state));
}
static int
next reply other threads:[~2004-11-29 14:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-29 14:39 Jon Beniston [this message]
2004-11-29 14:47 ` Richard Earnshaw
2004-11-29 14:57 ` Jon Beniston
2004-11-29 15:06 ` Richard Earnshaw
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='001d01c4d620$edbb9e50$0bbda8c0@Kindrogan' \
--to=jbeniston@compxs.com \
--cc=gdb-patches@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox