Perturbations and operator trace functions