Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can I get dynamic instruction count? #14

Closed
channoh opened this issue Mar 23, 2015 · 11 comments
Closed

How can I get dynamic instruction count? #14

channoh opened this issue Mar 23, 2015 · 11 comments

Comments

@channoh
Copy link

channoh commented Mar 23, 2015

Hi,

I want to get dynamic instruction count via Spike, but the disassembly codes from -d option (i.e., spike -d pk hello and :r) is weird.

How can I get dynamic instruction count via Spike?

@channoh channoh changed the title Dynamic instruction count How can I get dynamic instruction count? Mar 23, 2015
@aswaterman
Copy link
Collaborator

The proxy kernel can do this for you with its -s flag (try spike pk -s
hello)

On Mon, Mar 23, 2015 at 1:23 AM, Channoh Kim notifications@github.com
wrote:

Hi,

I want to get dynamic instruction count via Spike, but the disassembly
codes from -d option (i.e., spike -d pk hello and :r) is weird.


Reply to this email directly or view it on GitHub
#14.

@channoh
Copy link
Author

channoh commented Mar 23, 2015

Good. Thanks!

@channoh channoh closed this as completed Mar 23, 2015
@AhmedSamara
Copy link

Is there an updated and current way to get dynamic instruction count? This no longer works.

@AhmedSamara
Copy link

Is there a way to get a more detailed breakdown of types of instructions executed?
And if not, would there be an interest in me implementing this feature and upstreaming it?

@anmolsahoo25
Copy link

Hi,
We are working on a Python tool which takes as input the log file generated from spike using the -l option and outputs different statistics based on the log file.

You can check out the implemented features and ongoing features at - https://bitbucket.org/anmol07/spikepost

@AhmedSamara
Copy link

AhmedSamara commented Jun 20, 2018

Can that one differentiate between instructions in the user program vs instructions from pk?
My other concern is that for most benchmarks the log files quickly become huge (>30GB)

@anmolsahoo25
Copy link

anmolsahoo25 commented Jun 21, 2018

Currently we are processing log files using pure Python. These suffice for the common riscv benchmarks. I am looking at a numpy/spark backend for faster analytics.

As to the other part of your question, I am not sure if I understand correctly. Could you please elaborate a bit about what you mean instructions generated by pk?

@AhmedSamara
Copy link

What I mean is when you execute a program with spike pk <prog>, you aren't just running your program, you are also running pk. So not every instruction that is a part of the log is a part of the program.
But as I type this out I realized pk is only necessary for me because of the printf statements.

@neelgala
Copy link
Contributor

neelgala commented Jun 21, 2018 via email

@anmolsahoo25
Copy link

We already have a feature of selecting an address range where you want the profiling to happen. It can be extended to incorporate address blocks that have to be skipped. Will add that as an enhancement in the repo.

@AhmedSamara
Copy link

I think the problem with using a full log file is that for complicated programs, it becomes really huge. for the program I was trying to benchmark, it produced a 300GB log file and then crashed because it run out of HDD space. I could move it onto a larger system but at that point, parsing will also be ridiculous. It's possible I did something wrong.
I'm working on an instruction count modification on my fork and will submit a PR if I can get anything reasonable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants