We use 118 strong gravitational lenses observed by the SLACS, BELLS, LSD and SL2S surveys to constrain the total mass profile and the profile of luminosity density of stars (light-tracers) in elliptical galaxies up to redshift z ∼ 1. Assuming power-law density profiles for the total mass density, ρ = ρ 0 (r/r 0 ) −α , and luminosity density, ν = ν 0 (r/r 0 ) −δ , we investigate the power law index and its first derivative with respect to the redshift. Using Monte Carlo simulations of the posterior likelihood taking the Planck's best-fitted cosmology as a prior, we find γ = 2.132 ± 0.055 with a mild trend ∂γ/∂z l = −0.067 ± 0.119 when α = δ = γ, suggesting that the total density profile of massive galaxies could have become slightly steeper over cosmic time. Furthermore, similar analyses performed on sub-samples defined by different lens redshifts and velocity dispersions, indicate the need of treating low, intermediate and high-mass galaxies separately. Allowing δ to be a free parameter, we obtain α = 2.070 ± 0.031, ∂α/∂z l = −0.121 ± 0.078, and δ = 2.710 ± 0.143. The model in which mass traces light is rejected at > 95% confidence and our analysis robustly indicates the presence of dark matter in the form of a mass component that is differently spatially extended than the light. In this case, intermediate-mass elliptical galaxies (200 km/s < σ ap 300 km/s) show the best consistency with the singular isothermal sphere as an effective model of galactic lenses.