Reducing the Cost of Protection against Soft Errors using Profile-Based Analysis