Generalize the profile creation for multiple kernels