1/*2* Copyright (C) 2017-2019 Lyude Paul3* Copyright (C) 2017-2019 Alyssa Rosenzweig4*5* Permission is hereby granted, free of charge, to any person obtaining a6* copy of this software and associated documentation files (the "Software"),7* to deal in the Software without restriction, including without limitation8* the rights to use, copy, modify, merge, publish, distribute, sublicense,9* and/or sell copies of the Software, and to permit persons to whom the10* Software is furnished to do so, subject to the following conditions:11*12* The above copyright notice and this permission notice (including the next13* paragraph) shall be included in all copies or substantial portions of the14* Software.15*16* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR17* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,18* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL19* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER20* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,21* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE22* SOFTWARE.23*24*/2526#ifndef __PAN_DECODE_PUBLIC_H__27#define __PAN_DECODE_PUBLIC_H__2829#include <stdio.h>30#include <stdlib.h>31#include <stddef.h>32#include <stdbool.h>33#include <inttypes.h>3435/* Public entrypoints for the tracing infrastructure. This API should be kept36* more or less stable. Don't feel bad if you have to change it; just feel37* slightly guilty about creating more work for me later. -Alyssa <338*39* I'm joking. Mostly. panwrap (out-of-tree) includes this, so update that if40* you need to change something here. panwrap is open-source but cannot be41* included in-tree.42*/4344void pandecode_initialize(bool to_stderr);4546void pandecode_next_frame(void);4748void pandecode_close(void);4950void51pandecode_inject_mmap(uint64_t gpu_va, void *cpu, unsigned sz, const char *name);5253void pandecode_inject_free(uint64_t gpu_va, unsigned sz);5455void pandecode_jc(uint64_t jc_gpu_va, bool bifrost, unsigned gpu_id);5657void58pandecode_abort_on_fault(uint64_t jc_gpu_va);5960#endif /* __MMAP_TRACE_H__ */616263