robert.swiecki@gmail.com | 6310b11 | 2015-02-17 23:30:45 +0000 | [diff] [blame] | 1 | /* |
| 2 | * |
| 3 | * honggfuzz - architecture dependent code (LINUX/PERF) |
| 4 | * ----------------------------------------- |
| 5 | * |
| 6 | * Author: Robert Swiecki <swiecki@google.com> |
| 7 | * |
| 8 | * Copyright 2010-2015 by Google Inc. All Rights Reserved. |
| 9 | * |
| 10 | * Licensed under the Apache License, Version 2.0 (the "License"); you may |
| 11 | * not use this file except in compliance with the License. You may obtain |
| 12 | * a copy of the License at |
| 13 | * |
| 14 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 15 | * |
| 16 | * Unless required by applicable law or agreed to in writing, software |
| 17 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 18 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |
| 19 | * implied. See the License for the specific language governing |
| 20 | * permissions and limitations under the License. |
| 21 | * |
| 22 | */ |
| 23 | |
Jagger | 876a74c | 2016-02-09 22:09:11 +0100 | [diff] [blame] | 24 | #ifndef _HF_LINUX_PERF_H_ |
| 25 | #define _HF_LINUX_PERF_H_ |
robert.swiecki@gmail.com | 6310b11 | 2015-02-17 23:30:45 +0000 | [diff] [blame] | 26 | |
Jagger | ade3d74 | 2015-09-10 03:35:15 +0200 | [diff] [blame] | 27 | typedef struct { |
| 28 | int cpuInstrFd; |
| 29 | int cpuBranchFd; |
Jagger | 853d59e | 2016-02-07 16:43:18 +0100 | [diff] [blame] | 30 | int cpuIptBtsFd; |
Jagger | ade3d74 | 2015-09-10 03:35:15 +0200 | [diff] [blame] | 31 | } perfFd_t; |
| 32 | |
Jagger | b2c1fad | 2016-03-17 23:37:10 +0100 | [diff] [blame^] | 33 | extern bool arch_perfEnable(pid_t pid, honggfuzz_t * hfuzz, fuzzer_t * fuzzer, perfFd_t * perfFds); |
Jagger | ade3d74 | 2015-09-10 03:35:15 +0200 | [diff] [blame] | 34 | extern void arch_perfAnalyze(honggfuzz_t * hfuzz, fuzzer_t * fuzzer, perfFd_t * perfFds); |
robert.swiecki@gmail.com | d781897 | 2015-02-24 23:37:59 +0000 | [diff] [blame] | 35 | extern void arch_perfPoll(int perfFd); |
Jagger | 4d10985 | 2016-02-04 02:28:44 +0100 | [diff] [blame] | 36 | extern bool arch_perfInit(honggfuzz_t * hfuzz); |
robert.swiecki@gmail.com | 6310b11 | 2015-02-17 23:30:45 +0000 | [diff] [blame] | 37 | |
| 38 | #endif |