| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: i386_pmc.c,v 1.3 2000/09/13 05:22:12 thorpej Exp $ */ | | 1 | /* $NetBSD: i386_pmc.c,v 1.4 2017/03/08 16:09:27 maxv 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 |
| @@ -34,39 +34,27 @@ | | | @@ -34,39 +34,27 @@ |
34 | */ | | 34 | */ |
35 | | | 35 | |
36 | /* | | 36 | /* |
37 | * Interface to x86 CPU Performance Counters. | | 37 | * Interface to x86 CPU Performance Counters. |
38 | */ | | 38 | */ |
39 | | | 39 | |
40 | #include <sys/types.h> | | 40 | #include <sys/types.h> |
41 | | | 41 | |
42 | #include <machine/sysarch.h> | | 42 | #include <machine/sysarch.h> |
43 | | | 43 | |
44 | int | | 44 | int |
45 | i386_pmc_info(struct i386_pmc_info_args *args) | | 45 | i386_pmc_info(struct i386_pmc_info_args *args) |
46 | { | | 46 | { |
47 | | | 47 | return -1; |
48 | if (sysarch(I386_PMC_INFO, args) == -1) | | | |
49 | return (-1); | | | |
50 | | | | |
51 | return (0); | | | |
52 | } | | 48 | } |
53 | | | 49 | |
54 | int | | 50 | int |
55 | i386_pmc_startstop(struct i386_pmc_startstop_args *args) | | 51 | i386_pmc_startstop(struct i386_pmc_startstop_args *args) |
56 | { | | 52 | { |
57 | | | 53 | return -1; |
58 | if (sysarch(I386_PMC_STARTSTOP, args) == -1) | | | |
59 | return (-1); | | | |
60 | | | | |
61 | return (0); | | | |
62 | } | | 54 | } |
63 | | | 55 | |
64 | int | | 56 | int |
65 | i386_pmc_read(struct i386_pmc_read_args *args) | | 57 | i386_pmc_read(struct i386_pmc_read_args *args) |
66 | { | | 58 | { |
67 | | | 59 | return -1; |
68 | if (sysarch(I386_PMC_READ, args) == -1) | | | |
69 | return (-1); | | | |
70 | | | | |
71 | return (0); | | | |
72 | } | | 60 | } |