diff options
| author | ae112802 <none@none> | 2007-02-28 16:33:41 -0800 |
|---|---|---|
| committer | ae112802 <none@none> | 2007-02-28 16:33:41 -0800 |
| commit | 8d4e547db823a866b8f73efc0acdc423e2963caf (patch) | |
| tree | bf98c7d4faa98c05bb2e0776802cf49f49027bd4 /usr/src/cmd/cpc | |
| parent | 02ca3e029e37aa98ac6717698bfdac6afe960932 (diff) | |
| download | illumos-joyent-8d4e547db823a866b8f73efc0acdc423e2963caf.tar.gz | |
6470504 Remove Niagara2 IDLE loop workaround
6481563 Add support for Niagara2 2.x SPARC performance counters
6481949 handle dynamic hpriv peformance counting using N2 2.0 PCR
6528668 move stick compare workaround to Niagara2 and generic CPU module
Diffstat (limited to 'usr/src/cmd/cpc')
| -rw-r--r-- | usr/src/cmd/cpc/common/cputrack.c | 10 | ||||
| -rw-r--r-- | usr/src/cmd/cpc/cputrack/Makefile.com | 9 | ||||
| -rw-r--r-- | usr/src/cmd/cpc/cputrack/i386/Makefile | 11 |
3 files changed, 19 insertions, 11 deletions
diff --git a/usr/src/cmd/cpc/common/cputrack.c b/usr/src/cmd/cpc/common/cputrack.c index 37aaf9f600..9b334d0aeb 100644 --- a/usr/src/cmd/cpc/common/cputrack.c +++ b/usr/src/cmd/cpc/common/cputrack.c @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Copyright 2007 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -80,7 +80,9 @@ cputrack_pctx_errfn(const char *fn, const char *fmt, va_list ap) } static int cputrack(int argc, char *argv[], int optind); +#if defined(__i386) static void p4_ht_error(void); +#endif #if !defined(TEXT_DOMAIN) #define TEXT_DOMAIN "SYS_TEST" @@ -343,9 +345,11 @@ pinit_lwp(pctx_t *pctx, pid_t pid, id_t lwpid, void *arg) errstr = strerror(errno); if (errno == EAGAIN) (void) cpc_unbind(cpc, set); +#if defined(__i386) if (errno == EACCES) p4_ht_error(); else +#endif (void) fprintf(stderr, gettext( "%6d: init_lwp: can't bind perf counters " "to lwp%d - %s\n"), (int)pid, (int)lwpid, @@ -690,6 +694,8 @@ cputrack(int argc, char *argv[], int optind) return (err != 0 ? 1 : 0); } +#if defined(__i386) + #define OFFLINE_CMD "/usr/sbin/psradm -f " #define BUFSIZE 5 /* enough for "n " where n is a cpuid */ @@ -811,3 +817,5 @@ p4_ht_error(void) exit(1); } + +#endif /* defined(__i386) */ diff --git a/usr/src/cmd/cpc/cputrack/Makefile.com b/usr/src/cmd/cpc/cputrack/Makefile.com index a6b61171f1..d67fb933dd 100644 --- a/usr/src/cmd/cpc/cputrack/Makefile.com +++ b/usr/src/cmd/cpc/cputrack/Makefile.com @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,7 +19,7 @@ # CDDL HEADER END # # -# Copyright 2005 Sun Microsystems, Inc. All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "%Z%%M% %I% %E% SMI" @@ -31,7 +30,7 @@ include ../../../Makefile.cmd PROG = cputrack OBJS = $(PROG).o caps.o time.o setgrp.o strtoset.o SRCS = $(OBJS:%.o=../../common/%.c) -LDLIBS += -lcpc -lpctx -lkstat +LDLIBS += -lcpc -lpctx CFLAGS += $(CCVERBOSE) $(CTF_FLAGS) CFLAGS64 += $(CCVERBOSE) $(CTF_FLAGS) diff --git a/usr/src/cmd/cpc/cputrack/i386/Makefile b/usr/src/cmd/cpc/cputrack/i386/Makefile index c2eedd1f9c..139c8bd92a 100644 --- a/usr/src/cmd/cpc/cputrack/i386/Makefile +++ b/usr/src/cmd/cpc/cputrack/i386/Makefile @@ -2,9 +2,8 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the -# Common Development and Distribution License, Version 1.0 only -# (the "License"). You may not use this file except in compliance -# with the License. +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. @@ -20,11 +19,13 @@ # CDDL HEADER END # # -# Copyright (c) 1999 by Sun Microsystems, Inc. -# All rights reserved. +# Copyright 2007 Sun Microsystems, Inc. All rights reserved. +# Use is subject to license terms. # #ident "%Z%%M% %I% %E% SMI" include ../Makefile.com +LDLIBS += -lkstat + install: all $(ROOTPROG32) |
