We report the first measurement of the inclusive jet and the dijet longitudinal double-spin asymmetries, ALL, at midrapidity in polarized pp collisions at a center-of-mass energy s=510 GeV. The inclusive jet ALL measurement is sensitive to the gluon helicity distribution down to a gluon momentum fraction of x≈0.015, while the dijet measurements, separated into four jet-pair topologies, provide constraints on the x dependence of the gluon polarization. Both results are consistent with previous measurements made at s=200 GeV in the overlapping kinematic region, x>0.05, and show good agreement with predictions from recent next-to-leading order global analyses