We discuss destruction of a thermally stable layer in the upper part of the Earth's outer core by compositional convection excited at the inner core boundary. We propose to use the radial distribution of power induced by thermal and compositional buoyancy (rate of kinetic energy production) as a measure of occurrence of thermal and compositional convection. The power consists of the terms proportional to convective entropy flux and convective compositional flux. In the region with positive power, convection is active because kinetic energy can be produced by buoyancy force, and a stably stratified layer could not be formed there. On the other hand, in the region with negative power, convection is suppressed and a stably stratified layer may be produced. Considering penetration effect of convection, we discuss possible maximum and minimum thicknesses of the stable layer based on the radial distribution of power and its radial integral, respectively. We construct a 1-dimensional thermal and compositional balance model of the Earth's core with a larger value of thermal conductivity recently suggested by high-pressure experiments and first principle calculations, and estimate radial distributions of power for various values of core mantle boundary (CMB) heat flux Q_CMB. When Q_CMB > Q_sCMB no thermally stable layer can exist, where Q_sCMB is conductive heat flux along the adiabat at CMB. On the other hand, when Q_CMB < Q_sCMB, formation of an upper thermally stable layer becomes possible, depending on the extent of penetration of compositional convection excited below. When Q_CMB is sufficiently lower than Q_sCMB, a thermally stable layer survives the maximum penetration of compositional convection. The results show that a thermally stable layer becomes effectively thinner when the effect of compositional convection is considered compared with the results of previous studies where the existence of a stable layer is evaluated based on the convective flux only.