Orion Papadakis
Orion Papadakis

Reputation: 408

intel pin with docker

i have a pintool that runs normaly with this command:

../../../pin -injection child -t obj-intel64/mypintool.so -- obj-intel64/myexcecutable

i want in the position of myexcecutable to put a docker program which runs with this command:

docker run --rm --net spark-net --volumes-from data \
             cloudsuite/graph-analytics \
             --driver-memory 1g --executor-memory 4g \
             --master spark://spark-master:7077

when I tried to simply replace the -- obj-intel64/myexecutable with the docker command, the pintool started normally but it didn't finish normally.

I believe that my pintool attaches to docker and not in the contained application which is my target.

Do I have to follow a different approach in order to attach correctly my pintool in a program running in a docker container ?

Upvotes: 1

Views: 882

Answers (1)

nitzanms
nitzanms

Reputation: 1718

I'm not a docker expert but running it this way will indeed make pin instrument the docker exec. You need to put pin inside the docker instance and run the executable in the docker instance under pin. That is, command line should look something like this:

 docker -run <docker arguments> pin <pin arguments>  --myexecutable <executable arguments>

Upvotes: 1

Related Questions