This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
forked from aosp-mirror/platform_external_qemu
-
Notifications
You must be signed in to change notification settings - Fork 31
/
android-trace.h
64 lines (52 loc) · 2.02 KB
/
android-trace.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/* Copyright (C) 2006-2007 The Android Open Source Project
**
** This software is licensed under the terms of the GNU General Public
** License version 2, as published by the Free Software Foundation, and
** may be copied, distributed, and modified under those terms.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
*/
#ifndef TRACE_H
#define TRACE_H
#include <inttypes.h>
#include "android-trace_common.h"
extern uint64_t start_time, end_time;
extern uint64_t elapsed_usecs;
extern uint64_t Now();
struct TranslationBlock;
// The simulated time, in clock ticks, starting with one.
extern uint64_t sim_time;
extern uint64_t trace_static_bb_num(void);;
// This variable == 1 if we are currently tracing, otherwise == 0.
extern int tracing;
extern int trace_all_addr;
extern int trace_cache_miss;
extern void start_tracing();
extern void stop_tracing();
extern void trace_init(const char *filename);
extern void trace_bb_start(uint32_t bb_addr);
extern void trace_add_insn(uint32_t insn, int is_thumb);
extern void trace_bb_end();
extern int get_insn_ticks_arm(uint32_t insn);
extern int get_insn_ticks_thumb(uint32_t insn);
extern void trace_exception(uint32_t pc);
extern void trace_bb_helper(uint64_t bb_num, struct TranslationBlock *tb);
extern void trace_insn_helper();
extern void sim_dcache_load(uint32_t addr);
extern void sim_dcache_store(uint32_t addr, uint32_t val);
extern void sim_dcache_swp(uint32_t addr);
extern void trace_interpreted_method(uint32_t addr, int call_type);
extern const char *trace_filename;
extern int tracing;
extern int trace_cache_miss;
extern int trace_all_addr;
// Trace process/thread operations
extern void trace_switch(int pid);
extern void trace_fork(int tgid, int pid);
extern void trace_clone(int tgid, int pid);
extern void trace_exit(int exitcode);
extern void trace_name(char *name);
#endif /* TRACE_H */