The second parameter to INS_OperandWritten() must be in the range [0, n-1] where 'n' is the value returned by INS_OperandCount(). For example: INS ins = ... ...
thank you Greg. Now, it is clear for me. I have another question about the inscount0 tool. i wrote a small C program, #include <stdio.h> main() { int i; i=19; ...
The instruction count includes *all* the instructions executed - including those in the shared libraries - not only those in the executable you created. ...
Yes, you are right about this. Pin currently pretends that memory accesses with explicit segment overrides are NOT memory access instructions. The reason for...
Hi pinheads, I am using INS_Mnemonic(ins)== "MOV" to calculate the number of mov instrucitons in a program. I have 3 tools, some part of these program will...
... Is this because the INS_InsertCall will include all the instructions including the shared libaries whereas the "mov" will count only in the executable. ......
not necessarily. for your code, mov will count the number of instructions in the application you are instrumenting (both include shared libraries, so that is...
In other words: icount will count the total number of _dynamic_ instructions, while mov will count the number of _static_ MOV instructions. Does this help? ......
Hello, When PIN_RemoveInstrumentation() is used, is there a way of retaining or reinvoking the calls to analysis routines set up by the image API? To give you...
Call PIN_RemoveInstrumentation. The first time you enter an instrumentation routine after that, use APP_ImageHead(APP) to walk the list of loaded images and...
Hello PINheads, First, are the following statements true for PIN: * instructions prefixed with REP k (thus which are repeated k times) are only 'counted' once ...
Hi all, I'm writing a PinTool that generates a large amount of program traces. For efficiency, I would like to use double buffering to minimize the number of...
Pin does not discard NOP instructions. Are you seeing some sort of bug where it does? Pin does consider REP prefixed instructions as just one instruction. You...
... No, I was printing out a list of executed instructions, and there were no NOPs in there. Since compilers use NOPs quite often, I assumed PIN might be...
What do the program headers look like? Do an objdump -x The assertion is checking that the delta between vaddr and paddr in a program header is the same for...
Thanks for the reply! Here is the output from "readelf -l", Elf file type is EXEC (Executable file) Entry point 0x4000000000009120 There are 12 program...
VJ brought up a good point about the NOPs. Pin disassemblies don't print the string "nop", so you may have missed them. Instead, Pin prints the actual...
I just downloaded the tarball and tried it. But somehow a few assertion happens. A:elfio/img_elf.cpp:ProcessProgramHeaders:389: unknown prog header type...
... Oh, ok... So, what would be the best way to identify NOP instructions? This is just for future use, because, as long as they are counted in the total...
Hi, I am trying to instrument specific functions to collect memory address traces separately for each function. I am using Pin kit 7674 on cygwin/Windows &...
Hi, if you want to compile the application with gcc on windows, you can export your functions (e.g by using __declspec( dllexport )), the PinTool sample you...
Pin tools cannot use pthreads, even if it is indirectly through a second library such as libaio. I have not heard of anyone doing async I/O in Pin, but maybe...
It appears that we don't have a convenient function for identifying NOPs at present. For now, you would have to use INS_Address() to get the address, then...
Hi Greg, Thanks for the reply. I took a quick look at libaio but couldn't find any pthread usage or linking. Rather than get into Linux's asynchronous I/O...
Hi, I am trying to use Pin to do some multi-thread experiments, but I am not sure if my understanding of how multi-thread program would execute upon pin is...