-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cpc: Update the Solaris generic-event test
Signed-off-by: Eugene Loh <eugene.loh@oracle.com> Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
- Loading branch information
Showing
1 changed file
with
5 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,28 @@ | ||
/* | ||
* Oracle Linux DTrace. | ||
* Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. | ||
* Copyright (c) 2009, 2023, Oracle and/or its affiliates. All rights reserved. | ||
* Licensed under the Universal Permissive License v 1.0 as shown at | ||
* http://oss.oracle.com/licenses/upl. | ||
*/ | ||
|
||
/* | ||
* Test that we can successfully enable a probe using a generic event. | ||
* Currently, all platforms implement 'PAPI_tot_ins' so we'll use that. | ||
* Currently, all platforms implement 'cpu_clock' so we'll use that. | ||
* Note that this test will fail if the system under test does not | ||
* implement that event. | ||
* | ||
* This test will fail if: | ||
* 1) The system under test does not define the 'PAPI_tot_ins' event. | ||
* 1) The system under test does not define the 'cpu_clock' event. | ||
*/ | ||
|
||
#pragma D option quiet | ||
#pragma D option bufsize=128k | ||
|
||
cpc:::PAPI_tot_ins-all-10000 | ||
cpc:::cpu_clock-all-10000 | ||
{ | ||
@[probename] = count(); | ||
} | ||
|
||
tick-1s | ||
/n++ > 10/ | ||
tick-3s | ||
{ | ||
exit(0); | ||
} |