xref: /optee_os/lib/libutee/arch/arm/gprof/gprof_pta.h (revision 883c4be3d11cacf49665f51d1d6af4c02a0a0afd)
1*883c4be3SJerome Forissier /*
2*883c4be3SJerome Forissier  * Copyright (c) 2016, Linaro Limited
3*883c4be3SJerome Forissier  * All rights reserved.
4*883c4be3SJerome Forissier  *
5*883c4be3SJerome Forissier  * Redistribution and use in source and binary forms, with or without
6*883c4be3SJerome Forissier  * modification, are permitted provided that the following conditions are met:
7*883c4be3SJerome Forissier  *
8*883c4be3SJerome Forissier  * 1. Redistributions of source code must retain the above copyright notice,
9*883c4be3SJerome Forissier  * this list of conditions and the following disclaimer.
10*883c4be3SJerome Forissier  *
11*883c4be3SJerome Forissier  * 2. Redistributions in binary form must reproduce the above copyright notice,
12*883c4be3SJerome Forissier  * this list of conditions and the following disclaimer in the documentation
13*883c4be3SJerome Forissier  * and/or other materials provided with the distribution.
14*883c4be3SJerome Forissier  *
15*883c4be3SJerome Forissier  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16*883c4be3SJerome Forissier  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17*883c4be3SJerome Forissier  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18*883c4be3SJerome Forissier  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
19*883c4be3SJerome Forissier  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
20*883c4be3SJerome Forissier  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
21*883c4be3SJerome Forissier  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22*883c4be3SJerome Forissier  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
23*883c4be3SJerome Forissier  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
24*883c4be3SJerome Forissier  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
25*883c4be3SJerome Forissier  * POSSIBILITY OF SUCH DAMAGE.
26*883c4be3SJerome Forissier  */
27*883c4be3SJerome Forissier 
28*883c4be3SJerome Forissier #ifndef __GPROF_PTA_H
29*883c4be3SJerome Forissier #define __GPROF_PTA_H
30*883c4be3SJerome Forissier 
31*883c4be3SJerome Forissier #include <stdbool.h>
32*883c4be3SJerome Forissier #include <stddef.h>
33*883c4be3SJerome Forissier #include <stdint.h>
34*883c4be3SJerome Forissier #include <tee_api_types.h>
35*883c4be3SJerome Forissier 
36*883c4be3SJerome Forissier TEE_Result __pta_gprof_send(void *buf, size_t len, uint32_t *id);
37*883c4be3SJerome Forissier TEE_Result __pta_gprof_pc_sampling_start(void *buf, size_t len, size_t offset,
38*883c4be3SJerome Forissier 					 size_t scale);
39*883c4be3SJerome Forissier TEE_Result __pta_gprof_pc_sampling_stop(uint32_t *rate);
40*883c4be3SJerome Forissier void __pta_gprof_fini(void);
41*883c4be3SJerome Forissier #endif /* __GPROF_PTA_H */
42