  For a spherically symmetric self-gravitating scalar field we study self
similar and quasi-self similar solutions in asymptotically flat and AdS
spacetimes in various dimensions. Our main approach relies on reducing the
Einstein-Klein-Gordon system of equations under the self similarity assumption
to a dynamical system. Applying standard techniques in the analysis of
dynamical system we study the corresponding phase diagrams, gaining some
insight into the short and long-term evolution of the system. In the
asymptotically flat case the fixed points of the dynamical system correspond to
conformally flat spacetimes. We observed a new transition from a fixed point to
a black hole and we compute the corresponding exponent analytically. In the
case of AdS spacetime, we observed the quasi self similar scalar field
scattering to infinity after interfering near the center corresponding to the
dynamical system with no fixed points.
