A tool based on intel pin to instrument programs