  The exact relationship between the long gamma-ray burst (LGRB) rate and the
cosmic star formation rate (CSFR) is essential for using LGRBs as cosmological
probes. In this work, we collect a large sample composed of 371 Swift LGRBs
with known redshifts and prompt emission properties. We first compare the
rest-frame prompt properties of these bursts in different redshift bins,
finding negligible redshift evolution of the luminosity of LGRBs with
$L_{\mathrm{iso}}\gtrsim10^{51}\,\mathrm{erg\, s^{-1}}$ between $z\sim1$ and
$z\sim4$. Then, by utilizing the CSFR obtained from the large-scale
cosmological hydrodynamical simulation, the Illustris simulation, we calculate
the cumulative redshift distribution of LGRBs under different metallicity
thresholds. After comparing with our sample, we find that the predictions with
a moderate threshold between $0.3\,Z_{\odot}\leqslant
Z_{\mathrm{th}}\leqslant1.0\,Z_{\odot}$ are consistent with the sample between
redshift $0<z<3$, while at higher redshifts between $3<z<5$, all metallicity
thresholds fit the data well. When changing to an empirical model based on
observations, the predictions show similar results as well. After comparing
with the metallicity distribution of the observed LGRB host galaxies between
$0<z<1$, we confirm that the production of LGRBs in galaxies with super-solar
metallicity is suppressed. Nevertheless, considering that a significant
fraction of stars are born in sub-solar metallicity environments at
$z\gtrsim3$, we suggest that, as a first approximation, LGRBs can be used as
direct tracers of the CSFR in this redshift range.
