提交 a24ae56f 编写于 作者: Z Zhou Yaoyang

tracing: separate MEM_PROF from DATAFLOW_PROF

上级 08bf9456
......@@ -340,4 +340,8 @@ config DATAFLOW_PROF
bool "Profiling dataflow dependency"
default n
config MEM_PROF
bool "Profiling memory"
default n
endmenu
......@@ -58,7 +58,7 @@ typedef struct Decode {
rtlreg_t tmp_reg[4];
#endif // CONFIG_RVV_010
#ifdef CONFIG_DATAFLOW_PROF
#if defined(CONFIG_DATAFLOW_PROF) || defined(CONFIG_MEM_PROF)
uint8_t fsrc3_id;
uint8_t mem_width;
uint8_t is_store;
......
......@@ -61,7 +61,7 @@ static word_t hosttlb_read_slowpath(struct Decode *s, vaddr_t vaddr, int len, in
e->gvpn = hosttlb_vpn(vaddr);
e->gppbase = paddr & (~(uint64_t)PAGE_MASK);
}
#ifdef CONFIG_DATAFLOW_PROF
#ifdef CONFIG_MEM_PROF
if (s != NULL) {
s->is_store = false;
s->paddr = paddr;
......@@ -82,7 +82,7 @@ static void hosttlb_write_slowpath(struct Decode *s, vaddr_t vaddr, int len, wor
e->gvpn = hosttlb_vpn(vaddr);
e->gppbase = paddr & (~(uint64_t)PAGE_MASK);
}
#ifdef CONFIG_DATAFLOW_PROF
#ifdef CONFIG_MEM_PROF
s->is_store = true;
s->paddr = paddr;
s->mem_width = len;
......@@ -100,7 +100,7 @@ word_t hosttlb_read(struct Decode *s, vaddr_t vaddr, int len, int type) {
return hosttlb_read_slowpath(s, vaddr, len, type);
} else {
Logm("Host TLB fast path");
#ifdef CONFIG_DATAFLOW_PROF
#ifdef CONFIG_MEM_PROF
paddr_t paddr = e->gppbase | (vaddr & PAGE_MASK);
if (s != NULL) { // mem read
s->is_store = false;
......@@ -122,7 +122,7 @@ void hosttlb_write(struct Decode *s, vaddr_t vaddr, int len, word_t data) {
hosttlb_write_slowpath(s, vaddr, len, data);
return;
}
#ifdef CONFIG_DATAFLOW_PROF
#ifdef CONFIG_MEM_PROF
paddr_t paddr = e->gppbase | (vaddr & PAGE_MASK);
s->is_store = true;
s->paddr = paddr;
......
......@@ -106,7 +106,7 @@ static inline word_t vaddr_read_internal(void *s, vaddr_t addr, int len, int typ
}
if (mmu_mode == MMU_DIRECT) {
Logm("Paddr reading directly");
#ifdef CONFIG_DATAFLOW_PROF
#ifdef CONFIG_MEM_PROF
if (s != NULL) { // mem read
struct Decode *_s = s;
_s->is_store = false;
......@@ -141,7 +141,7 @@ void vaddr_write(struct Decode *s, vaddr_t addr, int len, word_t data, int mmu_m
#endif
if (unlikely(mmu_mode == MMU_DYNAMIC)) mmu_mode = isa_mmu_check(addr, len, MEM_TYPE_WRITE);
if (mmu_mode == MMU_DIRECT) {
#ifdef CONFIG_DATAFLOW_PROF
#ifdef CONFIG_MEM_PROF
s->is_store = true;
s->paddr = addr;
s->mem_width = len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册