blob: 2ebbc30a5694b58859414292eb3f184949dd08b7 [file] [log] [blame]
robert.swiecki@gmail.com6310b112015-02-17 23:30:45 +00001/*
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
Jagger876a74c2016-02-09 22:09:11 +010024#ifndef _HF_LINUX_PERF_H_
25#define _HF_LINUX_PERF_H_
robert.swiecki@gmail.com6310b112015-02-17 23:30:45 +000026
Jaggerade3d742015-09-10 03:35:15 +020027typedef struct {
28 int cpuInstrFd;
29 int cpuBranchFd;
Jagger853d59e2016-02-07 16:43:18 +010030 int cpuIptBtsFd;
Jaggerade3d742015-09-10 03:35:15 +020031} perfFd_t;
32
Jaggerb2c1fad2016-03-17 23:37:10 +010033extern bool arch_perfEnable(pid_t pid, honggfuzz_t * hfuzz, fuzzer_t * fuzzer, perfFd_t * perfFds);
Jaggerade3d742015-09-10 03:35:15 +020034extern void arch_perfAnalyze(honggfuzz_t * hfuzz, fuzzer_t * fuzzer, perfFd_t * perfFds);
robert.swiecki@gmail.comd7818972015-02-24 23:37:59 +000035extern void arch_perfPoll(int perfFd);
Jagger4d109852016-02-04 02:28:44 +010036extern bool arch_perfInit(honggfuzz_t * hfuzz);
robert.swiecki@gmail.com6310b112015-02-17 23:30:45 +000037
38#endif