We present numerical analysis of the dynamic behavior of a single-and multicontact Fabry-Perot semiconductor laser frequency-swept by means of an ultrafast intracavity filter. The interrelated roles of the tuning speed, the filter bandwidth, the cavity length, and the self-phase modulation in laser dynamics are analyzed. Regular and irregular mode hopping, as well as fundamental and second harmonic sliding frequency mode locking and chaotic laser operation are identified as important dynamic regimes. The relation between the tuning dynamics asymmetry and the self-phase modulation in the laser is studied. The operation of a multicontact laser with an intracavity saturable absorber in a combined sliding-frequency and passive mode locking regime is shown; the dynamic asymmetry in the laser behavior is shown to be reduced but not eliminated by the presence of the absorber.