A simple profiling tool usinng performance counter