NVlabs / NVBit

220 stars 20 forks source link

mem_printf #15

Closed mahmoodn closed 4 years ago

mahmoodn commented 4 years ago

The output of mem_printf is something like this

0x0000000000000740 - opcode_id 5

I checked the source code. I would like to know if the address is virtual or physical? Global space? or something else? Also, what is the corresponding mnemonic of opcode_id?

ovilla commented 4 years ago

In the mem_printf tool, the opcode_id is just a unique identifier for any instruction that has memory operands.

If you need to find a precise correspondence you could assign a unique id to global (i.e. LDG,STG,...), local (i.e. LDL, STL, ....) and shared memory (STS, LDS, ...) instructions when instrumenting.

However, for the generic memory instructions (i.e. LD, ST, ... ) this would be hard, since they can be global, local, shared depending on a particular value of the address (there are some address ranges that make a generic memory operation falling in one of the 3 categories of global, local, shared).

At this point I don't think is possible to know those address regions using standard CUDA driver APIs, and we don't have implemented this feature in NVBit 1.3.

We will think if it is possible to include support for this in future releases of NVBit.

mahmoodn commented 4 years ago

Thanks. May I know your opinion about the memory address? Is that the physical memory address of the on chip DRAM?

ovilla commented 4 years ago

No, I was referring to the virtual address range.