pin tools forum

pin tools forum

Hi,

since Pin Tools belongs to Intel I wonder if there is a forum about it (the Yahoo group is no alternative)?
I encountered some strange behavior in Pin and need to ask someone whether it's a bug or something else.

Best regards

15 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Hi Olaf,

Sorry for the delayed response. Please feel free to post your concerns here, and I'll see if we can get some answers for you.

Best regards,

==
Aubrey W.
Intel Software Network Support

Hi Aubrey,

nevertheless thank you for the response and the invitation. I'll just use this thread to describe my problem.

I have two versions of a pintool tracing memory refernces of a particular function given by name.

V1:
// -------------------------------------------- start
static int InFunctionOfInterest = 0;

VOID EnterFunction()
{
++InFunctionOfInterest;
}

VOID LeaveFunction()
{
--InFunctionOfInterest;
}

VOID Instruction(INS ins, VOID *v)
{
if (InFunctionOfInterest == 0)
{
return;
}
// tracing done as in ManualExamples/pinatrace.cpp
}

VOID Routine(RTN rtn, VOID *v)
{
if (RTN_Name(rtn) == function_name)
{
RTN_Open(rtn);
RTN_InsertCall(rtn, IPOINT_BEFORE, (AFUNPTR)EnterFunction, IARG_END);
RTN_InsertCall(rtn, IPOINT_AFTER, (AFUNPTR)LeaveFunction, IARG_END);
RTN_Close(rtn);
}
}

int main(int argc, char *argv[])
{
// init
RTN_AddInstrumentFunction(Routine, 0);
INS_AddInstrumentFunction(Instruction, 0);
// aso.
}
// -------------------------------------------- stop

and V2:

// -------------------------------------------- start
VOID Instruction(INS ins, VOID *v)
{
// tracing done as in ManualExamples/pinatrace.cpp
}

VOID Routine(RTN rtn, VOID *v)
{
if (RTN_Name(rtn) == functionName)
{
RTN_Open(rtn);
for (INS ins = RTN_InsHead(rtn); INS_Valid(ins); ins = INS_Next(ins))
{
Instruction(ins, 0);
}
RTN_Close(rtn);
}
}

int main(int argc, char *argv[])
{
// init
RTN_AddInstrumentFunction(Routine, 0);
// not needed: INS_AddInstrumentFunction(Instruction, 0);
// aso.
}
// -------------------------------------------- stop

Now V1 has the clear advantage over V2 that it traces the function recursively. For V2 I haven't found a way to recursively instrument the instructions by hand (something like a function "RTN INS_GetCallee(INS)" could be handy).
However V1 shows strange behavior when a function is traced. In particular the first traces are somehow left out. That is, either "EnterFunction" gets called too late or the first couple of instructions of a function aren't instrumented properly.
For the moment I can live with V2 but eventually I'd like to get V1 working properly. And I'm not sure if it's my fault or if it's due to some quirks in Pintools.

Thanks in advance
Olaf

Please join the pinheads Yahoo group and ask this question there. http://tech.groups.yahoo.com/group/pinheads

Sorry to say so, but no way (for reasons just look at their ads).

Hi 

I am facing problem regarding Pin installation in windows 7.

Do you have any good tutorials?

Hello,

You might try posting your question here: https://groups.yahoo.com/neo/groups/pinheads/info

Regards, Hal

Intel(R) Developer Zone Support

http://software.intel.com
*Other names and brands may be claimed as the property of others.

 

 

 

 

 

 

 

 

 

 

Hi,

 

I would like to use Pin compatible on ARM architecture. I am not able to find any download link for the same. Kindly can you let me knwo the download path for the same. Will the pintools for linux OS present in path https://software.intel.com/en-us/articles/pintool-downloads  be compatible for ARM.

Thanking in Advance

Hello,

Please join the pinheads Yahoo* group and ask this question there. http://tech.groups.yahoo.com/group/pinheads

Regards, Hal

Intel(R) Developer Zone Support

http://software.intel.com
*Other names and brands may be claimed as the property of others.

Please tell me how to generate the PIN PLUG-IN for ECLIPSE, I use windows Xp and MinGW compiler. please help me. Thank You

I had run the pintool8 manual program inscount0.cpp in visual studio & mingw and got the errors please help me to solve it

the errors are attached

 

Attachments: 

AttachmentSize
Downloadtext/plain New Text Document (2).txt3.31 KB

Subject: Error while compiling the manual examples using the PIN tool with the command "make all"
Dear all
I am new to the pintools. I am using PIN for my M.tech project.
Details of software I am using are as follows

1. OS- Microsoft Windows XP [Version 5.1.2600]
2. Compiler MinGW Version 2, June 1991& Microsoft visual studio 2010 express
3.Pin tool package "pin-2.13-62141-msvc8-windows" Rev-62141,Date
Nov,22,2013,Compiler Kit- VC8
4. Cygwin.

I am trying to build the manual examples of PIN and getting following
messages while building the tools using "make all" command: in dos
command prompt
 ------------------------------------message---------------------------

C:\pin-2.12-58423-msvc8-windows\source\tools\ManualExamples>make all
link /DLL /EXPORT:main /NODEFAULTLIB /NOLOGO /INCREMENTAL:NO /MACHINE:x86 /ENTRY
:Ptrace_DllMainCRTStartup@12 /BASE:0x55000000 /OPT:REF  /out:obj-ia32/inscount0.
dll obj-ia32/inscount0.obj  /LIBPATH:../../../ia32/lib /LIBPATH:../../../ia32/li
b-ext /LIBPATH:../../../extras/xed2-ia32/lib pin.lib libxed.lib libcpmt.lib libc
mt.lib pinvm.lib kernel32.lib ntdll-32.lib
link: extra operand '/NODEFAULTLIB'
Try 'link --help' for more information.
../../../source/tools/Config/makefile.default.rules:156: recipe for target 'obj-
ia32/inscount0.dll' failed
make: *** [obj-ia32/inscount0.dll] Error 1
------------------------------message end------------------------------

Please help me to solve the problem

you can directly email me the solution email add= abirsarkar1987@gmail.com
thanks
Kaushik Sarkar
M.Tech (cse) cu

Hello,

Please join the pinheads Yahoo* group and ask this question there. http://tech.groups.yahoo.com/group/pinheads

Regards, Hal

Intel(R) Developer Zone Support

http://software.intel.com
*Other names and brands may be claimed as the property of others.

Hi All, I am facing issue using pin on linux 4.0. Has anyone else face the same issue. 

Terminal Output

pin/source/tools/ManualExamples$ ../../../pin -t obj-intel64/inscount0.so -- /bin/ls
E: 4.0 is not a supported linux release

Does pin not support latest linux kernel?

http://stackoverflow.com/questions/35511380/intel-pin-tool-on-linux-4-0

Any suggestions would be really helpful. Thanks! Manish

Hi Everyone. I want to write a pintool to record the frame pointer of each function call at runtime. Is there any API function that can be used to retrieve the current frame pointer.  I tried to instrument the binary by adding a function call  _builtin_frame_address() at the end of each function call. It seems that the stack addresses was messed up. I think maybe it is because pin does dynamic instrumentation. Any idea of how to solve the problem?

 

Leave a Comment

Please sign in to add a comment. Not a member? Join today