Adding check to ensure that instrumentation for mem allocations and sync barriers are inserted only when the user specifies the --profile flag