boegel / MICA

a Pin tool for collecting microarchitecture-independent workload characteristics
http://users.ugent.be/~kehoste/ELIS/MICA
Other
59 stars 34 forks source link

Pin tools #6

Open rjfnobre opened 8 years ago

rjfnobre commented 8 years ago

Can I use MICA with any version of the Pin tools from: https://software.intel.com/en-us/articles/pin-a-binary-instrumentation-tool-downloads

If not, then what is the version of Pin tools that I should use?

Additionally, should I use any specific version of the Linux kernel?

boegel commented 8 years ago

I haven't been using MICA or Pin for years now, so I'm afraid it's hard for me to answer this...

Maybe @amirjamez can answer your question though, since he has been using MICA recently?

amirjamez commented 8 years ago

Hi,

We have modified versions of the latest PIN and MICA on Ubuntu 14 and 15 versions. As still the package is not stable, I would suggest you not to use the latest PIN.

MICA is working on PIN 2-10 and we have tested it on both Ubuntu 12.04 and 14.04 on the default kernels.

P.s: in case you couldn't find PIN 2.10, here is a direct download link of the package:

https://drive.google.com/file/d/0B-AkmAlNRsymNVl1RndzbFVpZEU/view

-Amir

On Sep 9, 2016 4:52 PM, "Kenneth Hoste" notifications@github.com wrote:

I haven't been using MICA or Pin for years now, so I'm afraid it's hard for me to answer this...

Maybe @amirjamez https://github.com/amirjamez can answer your question though, since he has been using MICA recently?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/boegel/MICA/issues/6#issuecomment-245936595, or mute the thread https://github.com/notifications/unsubscribe-auth/AIglHi-dJs5EGxEjJEIs5kpvIJetCfa3ks5qoXKmgaJpZM4J5H8k .

thoward27 commented 6 years ago

@amirjamez is there any way to run MICA on PIN 3+ ? Apparently PIN 2 does not support linux kernal 4.13, I seem to be in a position where I either have to run PIN out of a virtual box, or somehow get MICA to run on PIN 3.6

EDIT: I've successfully gotten MICA running on Intel PIN 3.4 on Ubuntu 17.10. Some steps that were not apparently clear to me:

amirjamez commented 6 years ago

@thoward27 sorry for my sluggish reply. There was a recent commit on the Makefile which allowed the make for the latest PIN. Have you checked it out?

I've successfully gotten MICA running on Intel PIN 3.4 on Ubuntu 17.10.

let us know what steps you were taken.

Some steps that were not apparently clear to me:

MICA requires a mica.conf file to be located wherever you're using the tool from. You can copy the one from the MICA folder inside of pin/source/tools. itypes_default.spec also must be wherever you are running MICA from. If you keep receiving "mica not found" fully qualify where to find it, as this was the only way I got the tool to work.

Yes. mica config file and the spec should be present in the folder you are instrumenting the binary. Otherwise, you should pass it as an argument to the command line. Also, I would suggest to export mica folder (where the compiled mica is located) to your $env so you can call it anywhere you want. A sample usage of MICA is:

pin -t mica.so -- <program> [<parameter>]

twang15 commented 6 years ago

@thoward27 what are the steps to make mica to run on Pin 3.4?

twang15 commented 6 years ago

9 have the answers.

thoward27 commented 5 years ago

Sorry @twang15 and @amirjamez, I must have accidentally dismissed the notifications for this thread!

Either way, I just went through the process of installing PIN and MICA again, from scratch, using the latest PIN and MICA, here's what I did:

  1. Download PIN Kit #97619
  2. Unzip the archive
  3. Rename the unzipped folder to pin
  4. cd pin/source/tools/
  5. git clone https://github.com/boegel/MICA.git
  6. cd MICA
  7. Optional (to use the exact commit I used): git checkout 6058b02c67df13503abc7c71b4979846bd69ee47
  8. Comment out line 535 in mica_ppm.cpp
  9. make

At this point, you can find the mica.so file under the obj-intel64 directory.

In order to actually use MICA, copy mica.conf.example to the directory you plan on using PIN from. Then, run path/to/pin -t path/to/mica.so -- <your program> to generate the data.

thoward27 commented 5 years ago

@amirjamez, can you explain how to pass the mica.conf file as a parameter? My efforts have not proven fruitful

thoward27 commented 5 years ago

Also @amirjamez, I just created pull request #13 to remove step 8 from above. The change was quite simple to provide compatibility with the latest PIN tools.

amirjamez commented 5 years ago

@amirjamez, can you explain how to pass the mica.conf file as a parameter? My efforts have not proven fruitful

@thoward27 you need to have a mica.conf file explaining the type of analysis you are interested in having with MICA, i.e., https://github.com/boegel/MICA#specifying-type-of-analysis.

Feel free to contribute to the project if you would like to pass those parameters as a command line parameter :)

WilliamWangPeng commented 3 years ago

Sorry @twang15 and @amirjamez, I must have accidentally dismissed the notifications for this thread!

Either way, I just went through the process of installing PIN and MICA again, from scratch, using the latest PIN and MICA, here's what I did:

  1. Download PIN Kit #97619
  2. Unzip the archive
  3. Rename the unzipped folder to pin
  4. cd pin/source/tools/
  5. git clone https://github.com/boegel/MICA.git
  6. cd MICA
  7. Optional (to use the exact commit I used): git checkout 6058b02c67df13503abc7c71b4979846bd69ee47
  8. Comment out line 535 in mica_ppm.cpp
  9. make

At this point, you can find the mica.so file under the obj-intel64 directory.

In order to actually use MICA, copy mica.conf.example to the directory you plan on using PIN from. Then, run path/to/pin -t path/to/mica.so -- <your program> to generate the data.

these steps are on windows platform

WilliamWangPeng commented 3 years ago

@amirjamez, can you explain how to pass the mica.conf file as a parameter? My efforts have not proven fruitful

HI dear @thoward27
Do you still remember the ILP32 value in MICA, Is ILP32 smaller than 32?

thank you
best regards
William

thoward27 commented 3 years ago

@WilliamWangPeng I do not recall

ljz990305 commented 1 year ago

HI dear @thoward27 I tried to run MICA according to the steps you gave, but there was an error when I executed make. I don't know how to solve it. Have you ever encountered similar problems? I would appreciate your reply very much.

'cut' is not an internal or external command or a runnable program Or batch file. mkdir -p obj-intel64 c1 -std=gnu++11 -DVERBOSE -Wall -Werror -Wno-unknown-pragmas /MT /EHs- /EHa- /wd4530 /DTARGET_WINDOWS /nologo /Gy /Oi- /GR- /GS- /DPIN=1 /DPIN_CRT=1 /D_WINDOWS_HPATH="" /DLP64 /DTARGET_IA32E /DHOST_IA32E /I.. /.. /.. /source/include/pin /I.. /.. /.. /source/include/pin/gen -I.. /.. /.. /extras/stlport/include -I.. /.. /.. /extras -I.. /.. /.. /extras/libstdc++/include -I.. /.. /.. /extras/crt/include -I.. /.. /.. /extras/crt -I.. /.. /.. /extras/crt/include/arch-x86_64 -I.. /.. /.. /extras/crt/include/kernel/uapi -I.. /.. /.. /extras/crt/include/kernel/uapi/asm-x86 /FIinclude/msvc_compat.h /I.. /.. /.. /extras/components/include /I.. /.. /.. /extras/xed-intel64/include/xed /I.. /.. /.. /source/tools/InstLib /Od /c /Foobj-intel64/mica.obj mica.cpp 'c1' is not an internal or external command or a runnable program Or batch file. make: *** [obj-intel64/mica.obj] Error 1