pmctest.py (231698) | pmctest.py (231699) |
---|---|
1#!/usr/bin/env python 2# Copyright (c) 2012, Neville-Neil Consulting 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: 8# --- 17 unchanged lines hidden (view full) --- 26# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31# 32# Author: George V. Neville-Neil 33# | 1#!/usr/bin/env python 2# Copyright (c) 2012, Neville-Neil Consulting 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are 7# met: 8# --- 17 unchanged lines hidden (view full) --- 26# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 27# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 28# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 29# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 30# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 31# 32# Author: George V. Neville-Neil 33# |
34# $FreeBSD: head/tools/test/hwpmc/pmctest.py 231698 2012-02-14 18:51:21Z gnn $ | 34# $FreeBSD: head/tools/test/hwpmc/pmctest.py 231699 2012-02-14 18:57:10Z gnn $ |
35 36# Description: A program to run a simple program against every available 37# pmc counter present in a system. 38# 39# To use: 40# 41# pmctest.py -p ls > /dev/null 42# --- 5 unchanged lines hidden (view full) --- 48# to continue or Ctrl-D to stop. 49 50import sys 51import subprocess 52from subprocess import PIPE 53 54# A list of strings that are not really counters, just 55# name tags that are output by pmccontrol -L | 35 36# Description: A program to run a simple program against every available 37# pmc counter present in a system. 38# 39# To use: 40# 41# pmctest.py -p ls > /dev/null 42# --- 5 unchanged lines hidden (view full) --- 48# to continue or Ctrl-D to stop. 49 50import sys 51import subprocess 52from subprocess import PIPE 53 54# A list of strings that are not really counters, just 55# name tags that are output by pmccontrol -L |
56notcounter = ["IAF", "IAP", "TSC", "UNC", "UCF"] | 56notcounter = ["IAF", "IAP", "TSC", "UNC", "UCF", "UCP"] |
57 58def main(): 59 60 from optparse import OptionParser 61 62 parser = OptionParser() 63 parser.add_option("-p", "--program", dest="program", 64 help="program to execute") --- 30 unchanged lines hidden --- | 57 58def main(): 59 60 from optparse import OptionParser 61 62 parser = OptionParser() 63 parser.add_option("-p", "--program", dest="program", 64 help="program to execute") --- 30 unchanged lines hidden --- |