Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
15 Views

Blocks in mix output truncated at 70 instructions..

Hi,

I'm using SDE and find it very useful. Can you tell me how to collect more than 70 instructions in a block. Some of my loops are longer than this and I find the loop is being broken in the -mix output into more than 1, sometimes 2-4 blocks. Any help is greatly appreciated..

0 Kudos
5 Replies
Highlighted
Moderator
15 Views

Hi,

In the current version, when running sde with "-mix" I manually increase the # of instructions per block to 100 (and limit Pin -- the JIT upon which SDE is built -- to creating traces of just one block to further avoid block fragmentation issues). For some codes, 100 insts per block is still insufficient.

You can still increase beyond the 100 but I don't have an exposed knob for that right now. To increase the number beyond 100, run your "sde" command line and add "-echo". For example: "sde -echo -mix -- /bin/ls". This will show you the long command line that the front-end (driver) program really runs. It displays it two ways. Cut-and-paste the first line and change the 100 to 300 (if you think that will help). And just execute that long command line directly.

Note, Pin has internal memory allocation limits and may still reduce the size of a block because it reaches some memory limit for the trace it is JIT'ting.

Thanks for the feedback. Let me know if this helps.

Regards,

Mark

0 Kudos
Highlighted
Beginner
15 Views

Mark,

This worked perfectly. One question, is the "-region-max-inss" option something you can pass on to pin in sde with the -p "pinarg" option? I can try this but thought I'd ask.

Perwise

0 Kudos
Highlighted
Moderator
15 Views

Hi,

Currently, because of the fragmentation issue, I pass "-xyzzy -region-max-inss 100" to pin when using the "-mix" functionality. I used to pass 300 but that triggered a different bug in pin that has now been fixed -- pin occasionally tried to put too much stuff in the JIT memory block it created and would crash. Since that bug was fixed, I can once again use 300 without causing any catastrophic problems.

But because I pass -region-max-inss implicitly to pin when using -mix, you cannot also pass it when using the driver. Both would get passed to pin, but my 100 is last; not sure which it uses when there is a duplicate knob. You are right that using -p pinarg is the right way to do it. You'd have to put a -p in front of the -region-max-inss and before the 300 as well. I should add a new knob to the "sde" front-end driver program so that users can specify their value for -region-max-inss overriding my default. For now, I hope the "-echo" technique gets you what you need. I'll also look at increasing it to 300 for the next release.

Regards,

Mark

0 Kudos
Highlighted
Beginner
15 Views

Mark,

One thing you may want to address. If you pass stdin from a file < input, it is not included in the -echo output. Thus.. when you redirect that -echo output to a file.. edit with ed or some editor, and then try running it.. the sdin is missing and you just end up with sde running a command waiting on input. I rectified this with a script.. but would be nice to have the last argument catch the executable and following input/output directives when using -echo.

Thanks for your help..

Perfwise

0 Kudos
Highlighted
Moderator
15 Views

Hi, The way linux shell redirects work, the sde driver does not see where your redirect is coming from. Your shell sets all that up before it runs the subprocess. That's a downside of the "-echo" technique. The echo thing was really meant for quick workarounds and debugging. I'll look at bumping the limit to 300 and making a knob so that users can set their favorite value.

Regards,

Mark

0 Kudos