Defining upper critical dimension Considering the usual Landau functional of the form:
$$ \beta L[\phi] = \int d^D r [\frac{1}{2} |\nabla \phi(r)|^2 + \frac{r_0}{2} |\phi(r)|^2 + \frac{u_0}{4} |\phi(r)|^4 ] $$
In searching for the upper critical dimension of the theory, we have two different viewpoints.
1) we know that at critical point, $r_0$ approaches zero, so we could recast the functional into a dimensionless form. After some simple calculations we get the new functional 
$$ \beta L[\phi] = \int d^D x [\frac{1}{2} |\nabla \phi(x)|^2 + \frac{1}{2} |\phi(x)|^2 + \frac{g}{4} |\phi(x)|^4 ] $$
where g is a dimensionless parameter which is 
$$g = u_0r_0^{\frac{D-4}{2}} $$
So we know that, if D is larger than 4, g will approach 0 as $r_0$ approaches zero. We conclude that the upper critical dimension of the theory is 4.
2) Another way to view this problem is to use RG flow, we continuously integrate out the higher momentum of the system. At the end of the day we get the same result.
My question is, are these two viewpoints essentially the same. I guess it is because at critical point, the correlation length tend to approach infinity, so we could use the RG flow.
 A: Let me try to be precise with my phrasing: in general, if you are analyzing a critical point in a model's renormalization group flow and you compute the dimension at which the stable manifold of this critical point swaps stability with some other fixed point and becomes unstable, then this dimension will not typically be the same as the dimension you predict from dimensional analysis. However, we are often interested in Gaussian critical points, at which the fixed-point values of the couplings are zero; at these fixed points the renormalization group flow will agree with dimensional analysis. Since the Gaussian fixed point normally corresponds to mean field theory, this dimension is usually called the upper critical dimension, so in that sense the answer to your question is yes. (Although, I am not certain there are no models in which there is a non-trivial fixed point that becomes stable at a dimension higher than the Gaussian critical dimension).
To give a bit more detail, if you investigate the renormalization group flow equations of the $\phi^4$ model around the Gaussian fixed point $(r^\ast, u^\ast) = (0,0)$, you will find that the eigenvalues are $2$ and $4-D$. Thus, when $D > 4$ the second of these eigenvalues is negative, corresponding to flows along the stable manifold leading into the Gaussian fixed point along this direction. Flows along the other eigendirection are unstable and lead away from the fixed point. However, when $D < 4$ both of these eigendirections are unstable---a bifurcation has occurred, and the stability of the fixed point has changed. In this case, the Gaussian fixed point has become unstable to the Wilson-Fisher fixed point, which is near the Gaussian fixed point when $4-D$ is small. 
However, in general renormalization group flow equations can have more than just two possible fixed points that exchange stability, and some of these fixed points may never exchange stability with the Gaussian fixed point. For example, take a look at the paper "Non-perturbative fixed point in a non-equilibrium phase transition" by Canet et al. (arxiv:0505170v2), which explores a very different model from the $\phi^4$ theory. Their flow equations for two couplings, denoted $\lambda$ and $\sigma$, exhibit 3 fixed points. One of these fixed points is the Gaussian fixed point at which both coupling constants are $0$, another is a fixed point in which only $\lambda$ is non-zero, called the annihilation fixed point. The Gaussian fixed point has eigenvalues $(2,2-d)$, such that when $d > 2$ the second direction is stable and the Gaussian fixed point is the critical point. When $d < 2$ the Gaussian fixed point becomes unstable to the annihilation fixed point, which is now in the physical region of the parameter space (being at unphysical values of the couplings for $d > 2$). Here, dimensional analysis works and would identify the upper critical dimension as $d_c = 2$, as in your $\phi^4$ example. In particular, if you take time to have units of $L^2$, where $L$ is the length scale, then you can show that the dimensionless coupling $\tilde{\lambda} = \lambda L^{2-d}$, showing that when $d > 2$ we expect $\tilde{\lambda}$ to be small on large length scales $L$, while it will be large if $d < 2$. Thus, dimensional analysis again agrees with the RG analysis. (For completeness, the dimensionless coupling $\tilde{\sigma} = \sigma L^2$, independent of dimension. The positive power of $L$ indicates that this coupling would grow on large length scales if $\sigma \neq 0$.) 
However, we are not finished. The annihilation fixed point has eigenvalues $(d-2,3d-4)$ (at this level of the authors' approximation), indicating that this fixed point only has a stable direction so long as $d \in [4/3,2]$. When $d < 4/3$, this fixed point in turn loses stability to a third fixed point, which the authors denote $F^\ast$, in which both couplings are non-zero (moreover, the authors note that $F^\ast$ is not Gaussian in any dimension, at least at this level of approximation). This critical dimension, $d_c = 4/3$, is not obtained by dimensional analysis. We might call it an upper critical dimension from the perspective of the fixed point $F^\ast$, which loses stability when $d > 4/3$, but usually the term upper critical dimension is reserved for the dimension at which a fixed point loses stability to a Gaussian fixed point. Nonetheless, this example illustrates the general point that if you are not analyzing a Gaussian fixed point the critical dimension(s) you calculate may not be the upper critical dimension you would obtain through dimensional analysis.
