Lines Matching full:set

16 \fBint\fR \fBcpc_bind_curlwp\fR(\fBcpc_t *\fR\fIcpc\fR, \fBcpc_set_t *\fR\fIset\fR, \fBuint_t\fR \f…
21 …(\fBcpc_t *\fR\fIcpc\fR, \fBpctx_t *\fR\fIpctx\fR, \fBid_t\fR \fIid\fR, \fBcpc_set_t *\fR\fIset\fR,
27 …fBcpc_bind_cpu\fR(\fBcpc_t *\fR\fIcpc\fR, \fBprocessorid_t\fR \fIid\fR, \fBcpc_set_t *\fR\fIset\fR,
33 \fBint\fR \fBcpc_unbind\fR(\fBcpc_t *\fR\fIcpc\fR, \fBcpc_set_t *\fR\fIset\fR);
43 \fBint\fR \fBcpc_set_restart\fR(\fBcpc_t *\fR\fIcpc\fR, \fBcpc_set_t *\fR\fIset\fR);
50 requests contained in the \fIset\fR argument. If these functions are
52 count events on behalf of each request in the set, and each counter will be
56 The \fBcpc_bind_curlwp()\fR function binds the set to the calling \fBLWP\fR. If
62 By default, the system binds the set to the current \fBLWP\fR only. If the
65 inherit a copy of the request set. The newly created \fBLWP\fR will have its
67 \fIset\fR, and the counters will be enabled and begin counting events on behalf
74 the set have the \fBCPC_OVF_NOTIFY_EMT\fR flag set, the process will
82 The \fBcpc_bind_pctx()\fR function binds the set to the \fBLWP\fR specified by
91 The \fBcpc_bind_cpu()\fR function binds the set to the specified CPU and
94 any application has bound a set to a CPU, per-\fBLWP\fR counters are
98 sets, and any attempt to sample an invalidated set returns \fBEAGAIN\fR. To
101 until after it has unbound the set with \fBcpc_unbind()\fR. The \fIflags\fR
106 stored in the indexed request within the currently bound set, thereby changing
112 \fBCPC_OVF_NOTIFY_EMT\fR flag set overflows, the performance counters are
113 frozen and the \fBLWP\fR to which the set is bound receives a \fBSIGEMT\fR
124 The \fBcpc_unbind()\fR function unbinds the set from the resource to which it
125 is bound. All hardware resources associated with the bound set are freed and if
126 the set was bound to a CPU, the calling \fBLWP\fR is unbound from the
132 and \fBerrno\fR is set to indicate the error.
169 one process is allowed to bind to a CPU at a time and only one set can be bound
179 The set does not contain any requests or \fBcpc_set_add_request()\fR was not
187 One or more requests in the set conflict and might not be programmed
190 The \fIset\fR was not created with the same \fIcpc\fR handle.
194 For \fBcpc_unbind()\fR, the set is not bound.
197 \fBLWP\fR does not have a bound set.
265 cpc_set_t *set;
278 if ((set = cpc_set_create(cpc)) == NULL)
279 error("could not create set: %s", strerror(errno));
281 if ((ind0 = cpc_set_add_request(cpc, set, event0, 0, CPC_COUNT_USER, 0,
285 if ((ind1 = cpc_set_add_request(cpc, set, event1, 0, CPC_COUNT_USER, 0,
289 if ((diff = cpc_buf_create(cpc, set)) == NULL)
291 if ((after = cpc_buf_create(cpc, set)) == NULL)
293 if ((before = cpc_buf_create(cpc, set)) == NULL)
296 if (cpc_bind_curlwp(cpc, set, 0) == -1)
301 if (cpc_set_sample(cpc, set, before) == -1)
306 if (cpc_set_sample(cpc, set, after) == -1)
318 error("cannot sample set: %s", strerror(errno));
344 cpc_set_t *set;
365 if (cpc_set_sample(cpc, set, buf) != 0)
379 error("cannot set preset for request %d: %s", ind1,
381 if (cpc_set_restart(cpc, set) != 0)
390 library and creates a set:
405 if ((index = cpc_set_add_request(cpc, set, event, PRESET,
407 error("cannot add request to set: %s", strerror(errno));
409 if ((buf = cpc_buf_create(cpc, set)) == NULL)
412 if (cpc_bind_curlwp(cpc, set, 0) == -1)
419 cpc_unbind(cpc, set); /* done */
455 When a set is bound, the system assigns a physical hardware counter to count on
456 behalf of each request in the set. If such an assignment is not possible for
457 all requests in the set, the bind function returns -1 and sets \fBerrno\fR to
484 When a request is added to a set with the \fBCPC_OVF_NOTIFY_EMT\fR flag set,
486 preset value given. When the flag is set, however, the kernel arranges to send
488 \fBsi_code\fR member of the corresponding \fBsiginfo\fR structure is set to
491 the set is bound again.
494 If the \fBCPC_CAP_OVERFLOW_PRECISE\fR bit is set in the value returned by
498 request that the counter is counting has the \fBCPC_OVF_NOTIFY_EMT\fR flag set.
501 \fBCPC_OVF_NOTIFY_EMT\fR flag set and any counter in its set overflows.
527 Pentium 4 processors with HyperThreading Technology have only one set of
534 and any attempt to sample or bind a CPC set will return \fBEAGAIN\fR.
537 Only one CPC set at a time can be bound to a physical processor with
540 already has a CPU-bound set returns an error.
550 conflict among one or more requests in the set. For example, the branch_retired