Skip to content

Commit

Permalink
cpc: Update the Solaris generic-event test
Browse files Browse the repository at this point in the history
Signed-off-by: Eugene Loh <eugene.loh@oracle.com>
Reviewed-by: Kris Van Hees <kris.van.hees@oracle.com>
  • Loading branch information
euloh authored and kvanhees committed Feb 26, 2023
1 parent f9c4056 commit 4734ef3
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions test/unittest/cpc/tst.genericevent.d
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);
}

0 comments on commit 4734ef3

Please sign in to comment.