In this paper we probe axial nonuniformities in the carrier density profile of 1.55-mu-m capped-mesa-buried-heterostructure distributed-feedback (CMBH-DFB) InGaAsP-InP diode lasers. This is accomplished by directly measuring the spontaneous emission at various locations in the laser optical cavity. We observe that the highly asymmetric optical field, inherent in DFB lasers, produces a strong longitudinal nonuniformity in the carrier density. This promotes degradation of the lasing gain margin between the dominant TE Bragg modes, which is verified through measurements of the relative shift of the lasing mode in the stopband. The reduction of gain margin is shown to cause multimode operation in devices with large optical field asymmetries. In devices with modest optical field asymmetries, the reduction of the gain margin saturates, and single mode behavior is maintained. Our measurements are consistent in many respects with the predicted consequences of spatial hole burning.