pt_amd64.c revision 2
1N/A * This file is part of PowerTOP 1N/A * This program file is free software; you can redistribute it and/or modify it 1N/A * under the terms of the GNU General Public License as published by the 1N/A * Free Software Foundation; version 2 of the License. 1N/A * This program is distributed in the hope that it will be useful, but WITHOUT 1N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 1N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 1N/A * You should have received a copy of the GNU General Public License 1N/A * along with this program in a file named COPYING; if not, write to the 1N/A * Free Software Foundation, Inc., 1N/A * 51 Franklin Street, Fifth Floor, 1N/A * Boston, MA 02110-1301 USA 1N/A * Arjan van de Ven <arjan@linux.intel.com> 1N/A * Eric C Saxe <eric.saxe@sun.com> 1N/A * Aubrey Li <aubrey.li@intel.com> 1N/A * Copyright (c) 2009, Intel Corporation. 1N/A * All Rights Reserved. 2N/A * Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved. 1N/A * For the avoidance of doubt, except that if any license choice other 1N/A * than GPL or LGPL is available it will apply instead, Sun elects to 1N/A * use only the General Public License version 2 (GPLv2) at this time 1N/A * for any software where a choice of GPL license versions is made 1N/A * available with the language indicating that GPLv2 or any later 1N/A * version may be used, or where a choice of which version of the GPL 1N/A * is applied is otherwise unspecified. 1N/A * DTrace scripts for observing interrupts, callouts and cyclic events 1N/A * that cause CPU activity. Such activity prevents the processor from 1N/A * entering lower power states and reducing power consumption. 1N/A * g_dtp_events is the default script 1N/A"/arg0 != NULL && arg3 !=0/" 1N/A" this->devi = (struct dev_info *)arg0;" 1N/A" @interrupts[stringof(`devnamesp[this->devi->devi_major].dn_name)," 1N/A" this->devi->devi_instance] = count();" 1N/A"sdt:::callout-start" 1N/A"/(caddr_t)((callout_t *)arg0)->c_func == (caddr_t)&`setrun/" 1N/A" this->thr = (kthread_t *)(((callout_t *)arg0)->c_arg);" 1N/A" @events_u[stringof(this->thr->t_procp->p_user.u_comm)] = count();" 1N/A"sdt:::callout-start" 1N/A"/(caddr_t)((callout_t *)arg0)->c_func != (caddr_t)&`setrun/" 1N/A" @events_k[(caddr_t)((callout_t *)arg0)->c_func] = count();" 1N/A"/(caddr_t)((cyclic_t *)arg0)->cy_handler == (caddr_t)&`clock/" 1N/A" @events_k[(caddr_t)((cyclic_t *)arg0)->cy_handler] = count();" 1N/A"fbt::xc_common:entry" 1N/A" self->xc_func = arg0;" 1N/A" @events_x[execname, self->xc_func] = sum(arg0);" 1N/A"fbt::xc_common:return" 1N/A" self->xc_func = 0;" 1N/A * g_dtp_events_v is enabled through the -v option, it includes cyclic events 1N/A * in the report, allowing a complete view of system activity 1N/A"/arg0 != NULL && arg3 !=0/" 1N/A" this->devi = (struct dev_info *)arg0;" 1N/A" @interrupts[stringof(`devnamesp[this->devi->devi_major].dn_name)," 1N/A" this->devi->devi_instance] = count();" 1N/A"sdt:::callout-start" 1N/A"/(caddr_t)((callout_t *)arg0)->c_func == (caddr_t)&`setrun/" 1N/A" this->thr = (kthread_t *)(((callout_t *)arg0)->c_arg);" 1N/A" @events_u[stringof(this->thr->t_procp->p_user.u_comm)] = count();" 1N/A"sdt:::callout-start" 1N/A"/(caddr_t)((callout_t *)arg0)->c_func != (caddr_t)&`setrun/" 1N/A" @events_k[(caddr_t)((callout_t *)arg0)->c_func] = count();" 1N/A"/(caddr_t)((cyclic_t *)arg0)->cy_handler != (caddr_t)&`dtrace_state_deadman &&" 1N/A" (caddr_t)((cyclic_t *)arg0)->cy_handler != (caddr_t)&`dtrace_state_clean/" 1N/A" @events_k[(caddr_t)((cyclic_t *)arg0)->cy_handler] = count();" 1N/A"fbt::xc_common:entry" 1N/A" self->xc_func = arg0;" 1N/A" @events_x[execname, self->xc_func] = sum(arg0);" 1N/A"fbt::xc_common:return" 1N/A" self->xc_func = 0;" 1N/A * This script is selected through the -c option, it takes the CPU id as 1N/A * argument and observes activity generated by that CPU 1N/A" arg0 != NULL && arg3 != 0/" 1N/A" this->devi = (struct dev_info *)arg0;" 1N/A" @interrupts[stringof(`devnamesp[this->devi->devi_major].dn_name)," 1N/A" this->devi->devi_instance] = count();" 1N/A"sdt:::callout-start" 1N/A" (caddr_t)((callout_t *)arg0)->c_func == (caddr_t)&`setrun/" 1N/A" this->thr = (kthread_t *)(((callout_t *)arg0)->c_arg);" 1N/A" @events_u[stringof(this->thr->t_procp->p_user.u_comm)] = count();" 1N/A"sdt:::callout-start" 1N/A" (caddr_t)((callout_t *)arg0)->c_func != (caddr_t)&`setrun/" 1N/A" @events_k[(caddr_t)((callout_t *)arg0)->c_func] = count();" 1N/A" (caddr_t)((cyclic_t *)arg0)->cy_handler == (caddr_t)&`clock/" 1N/A" @events_k[(caddr_t)((cyclic_t *)arg0)->cy_handler] = count();" 1N/A"fbt::xc_common:entry" 1N/A" self->xc_func = arg0;" 1N/A" @events_x[execname, self->xc_func] = count();" 1N/A"fbt::xc_common:return" 1N/A" self->xc_func = 0;" 1N/A"fbt::xc_common:entry" 1N/A" self->xc_func = arg0;" 1N/A" self->xc_cpu = cpu;" 1N/A"fbt::send_dirint:entry" 1N/A" @events_xc[execname, self->xc_func, self->xc_cpu] = count();" 1N/A" self->xc_func = 0;" 1N/A * amd64 platform specific display messages