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..
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.
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.
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.
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..
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.