| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: pmc.h,v 1.1 2003/04/26 18:39:46 fvdl Exp $ */ | | 1 | /* $NetBSD: pmc.h,v 1.2 2014/03/20 20:45:32 christos Exp $ */ |
2 | | | 2 | |
3 | /*- | | 3 | /*- |
4 | * Copyright (c) 2000 Zembu Labs, Inc. | | 4 | * Copyright (c) 2000 Zembu Labs, Inc. |
5 | * All rights reserved. | | 5 | * All rights reserved. |
6 | * | | 6 | * |
7 | * Author: Jason R. Thorpe <thorpej@zembu.com> | | 7 | * Author: Jason R. Thorpe <thorpej@zembu.com> |
8 | * | | 8 | * |
9 | * Redistribution and use in source and binary forms, with or without | | 9 | * Redistribution and use in source and binary forms, with or without |
10 | * modification, are permitted provided that the following conditions | | 10 | * modification, are permitted provided that the following conditions |
11 | * are met: | | 11 | * are met: |
12 | * 1. Redistributions of source code must retain the above copyright | | 12 | * 1. Redistributions of source code must retain the above copyright |
13 | * notice, this list of conditions and the following disclaimer. | | 13 | * notice, this list of conditions and the following disclaimer. |
14 | * 2. Redistributions in binary form must reproduce the above copyright | | 14 | * 2. Redistributions in binary form must reproduce the above copyright |
| @@ -24,20 +24,48 @@ | | | @@ -24,20 +24,48 @@ |
24 | * THIS SOFTWARE IS PROVIDED BY ZEMBU LABS, INC. ``AS IS'' AND ANY EXPRESS | | 24 | * THIS SOFTWARE IS PROVIDED BY ZEMBU LABS, INC. ``AS IS'' AND ANY EXPRESS |
25 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WAR- | | 25 | * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WAR- |
26 | * RANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS- | | 26 | * RANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DIS- |
27 | * CLAIMED. IN NO EVENT SHALL ZEMBU LABS BE LIABLE FOR ANY DIRECT, INDIRECT, | | 27 | * CLAIMED. IN NO EVENT SHALL ZEMBU LABS BE LIABLE FOR ANY DIRECT, INDIRECT, |
28 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | | 28 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT |
29 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | | 29 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
30 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | | 30 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
31 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | | 31 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
32 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | | 32 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF |
33 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | | 33 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
34 | */ | | 34 | */ |
35 | | | 35 | |
36 | #ifdef _KERNEL | | 36 | #ifdef _KERNEL |
| | | 37 | /* |
| | | 38 | * LEGACY PMC support |
| | | 39 | */ |
| | | 40 | struct x86_64_pmc_info_args; |
37 | int pmc_info(struct proc *, struct x86_64_pmc_info_args *, | | 41 | int pmc_info(struct proc *, struct x86_64_pmc_info_args *, |
38 | register_t *); | | 42 | register_t *); |
| | | 43 | struct x86_64_pmc_startstop_args; |
39 | int pmc_startstop(struct proc *, struct x86_64_pmc_startstop_args *, | | 44 | int pmc_startstop(struct proc *, struct x86_64_pmc_startstop_args *, |
40 | register_t *); | | 45 | register_t *); |
| | | 46 | struct x86_64_pmc_read_args; |
41 | int pmc_read(struct proc *, struct x86_64_pmc_read_args *, | | 47 | int pmc_read(struct proc *, struct x86_64_pmc_read_args *, |
42 | register_t *); | | 48 | register_t *); |
| | | 49 | /* END LEGACY PMC SUPPORT */ |
| | | 50 | |
| | | 51 | #define pmc_md_fork(p1,p2) |
| | | 52 | #define pmc_get_num_counters() (0) |
| | | 53 | #define pmc_get_counter_type(c) (0) |
| | | 54 | #define pmc_save_context(p) |
| | | 55 | #define pmc_restore_context(p) |
| | | 56 | #define pmc_enable_counter(p,c) |
| | | 57 | #define pmc_disable_counter(p,c) |
| | | 58 | #define pmc_accumulate(p1,p2) |
| | | 59 | #define pmc_process_exit(p1) |
| | | 60 | #define pmc_counter_isconfigured(p,c) (0) |
| | | 61 | #define pmc_counter_isrunning(p,c) (0) |
| | | 62 | #define pmc_start_profiling(c,f) (0) |
| | | 63 | #define pmc_stop_profiling(c) (0) |
| | | 64 | #define pmc_alloc_kernel_counter(c,f) (0) |
| | | 65 | #define pmc_free_kernel_counter(c) (0) |
| | | 66 | #define pmc_configure_counter(p,c,f) (0) |
| | | 67 | #define pmc_get_counter_value(p,c,f,pv) (0) |
| | | 68 | |
| | | 69 | #define PMC_ENABLED(p) (0) |
| | | 70 | |
43 | #endif | | 71 | #endif |