Print this page
4023 - Typo in file(1) manpage and various others

Split Close
Expand all
Collapse all
          --- old/usr/src/man/man3cpc/cpc_bind_event.3cpc
          +++ new/usr/src/man/man3cpc/cpc_bind_event.3cpc
   1    1  '\" te
   2    2  .\" Copyright (c) 2007, Sun Microsystems, Inc. All Rights Reserved.
   3    3  .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
   4    4  .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
   5    5  .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
   6      -.TH CPC_BIND_EVENT 3CPC "Mar 02, 2007"
        6 +.TH CPC_BIND_EVENT 3CPC "Sep 10, 2013"
   7    7  .SH NAME
   8    8  cpc_bind_event, cpc_take_sample, cpc_rele \- use CPU performance counters on
   9    9  lwps
  10   10  .SH SYNOPSIS
  11   11  .LP
  12   12  .nf
  13   13  cc [ \fIflag\fR... ] \fIfile\fR... \(milcpc [ \fIlibrary\fR... ]
  14   14  #include <libcpc.h>
  15   15  
  16   16  \fBint\fR \fBcpc_bind_event\fR(\fBcpc_event_t *\fR\fIevent\fR, \fBint\fR \fIflags\fR);
↓ open down ↓ 160 lines elided ↑ open up ↑
 177  177  for (iter = 1; iter <= 20; iter++) {
 178  178      cpc_event_t before, after;
 179  179  
 180  180      if (cpc_take_sample(&before) == -1)
 181  181          break;
 182  182  
 183  183      /* ==> Computation to be measured goes here <== */
 184  184  
 185  185      if (cpc_take_sample(&after) == -1)
 186  186          break;
 187      -    (void) printf("%3d: %" PRId64 " %" PRId64 "\n", iter,
      187 +    (void) printf("%3d: %" PRId64 " %" PRId64 "\en", iter,
 188  188          after.ce_pic[0] - before.ce_pic[0],
 189  189          after.ce_pic[1] - before.ce_pic[1]);
 190  190  }
 191  191  
 192  192  if (iter != 20)
 193  193      error("can't sample '%s': %s", setting,    strerror(errno));
 194  194  
 195  195  free(setting);
 196  196  return (0);
 197  197  }\fR
↓ open down ↓ 24 lines elided ↑ open up ↑
 222  222  {
 223  223  ucontext_t *uap = arg;
 224  224  cpc_event_t sample;
 225  225  
 226  226  if (sig != SIGEMT || sip->si_code != EMT_CPCOVF) {
 227  227      psignal(sig, "example");
 228  228      psiginfo(sip, "example");
 229  229      return;
 230  230  }
 231  231  
 232      -(void) printf("lwp%d - si_addr %p ucontext: %%pc %p %%sp %p\n",
      232 +(void) printf("lwp%d - si_addr %p ucontext: %%pc %p %%sp %p\en",
 233  233      _lwp_self(), (void *)sip->si_addr,
 234  234      (void *)uap->uc_mcontext.gregs[PC],
 235  235      (void *)uap->uc_mcontext.gregs[USP]);
 236  236  
 237  237  if (cpc_take_sample(&sample) == -1)
 238  238      error("can't sample: %s", strerror(errno));
 239  239  
 240      -(void) printf("0x%" PRIx64 " 0x%" PRIx64 "\n",
      240 +(void) printf("0x%" PRIx64 " 0x%" PRIx64 "\en",
 241  241      sample.ce_pic[0], sample.ce_pic[1]);
 242  242  (void) fflush(stdout);
 243  243  
 244  244  sample.ce_pic[0] = PRESET0;
 245  245  sample.ce_pic[1] = PRESET1;
 246  246  if (cpc_bind_event(&sample, CPC_BIND_EMT_OVF) == -1)
 247  247      error("cannot bind lwp%d: %s", _lwp_self(), strerror(errno));
 248  248  }
 249  249  .fi
 250  250  .in -2
↓ open down ↓ 185 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX