Checking shared memory usage in 3.0

In 2.3 I used nvcc -cubin file.cu and checked the resulting file.cubin for information on registers and shared memory usage.
In 3.0, file.cubin is binary and to me, unreadable.

Where do I find similar information in Cuda 3.0?
I searched in both the cuda 3.0 programming guide and the fermi performance tuning guide, but didn’t find anything relevant.

Cuda 3.0 switched to elf format, which is why it looks different. The linux objdump utility can be used to dump out the cubin, but I could find the old text headers when I tried looking for them.

You can still pass -Xptxas=“–verbose” when compiling, and the ptx assembler will report per kernel register and memory use.

Thanks, the --verbose option gives me the information I need.

Are you saying you still find the text in the new elf-cubins? Strange that I don’t then, but perhaps I didn’t look hard enough.

Sorry missing not in there. I was starting to write that I did do a bit of reverse engineering and had half convinced myself that the same data was stored in the .nv.info. section for each kernel, but then I stopped. The edit was not 100% successful, as you can see…

You can find this in the .cubin files using ‘elfread’ or another utility; the size of the .nv.shared. section signifies the size of the shared memory required for that kernel. For example:

Section Headers:

  [Nr] Name			  Type			Addr	 Off	Size   ES Flg Lk Inf Al

  [ 0]				   NULL			00000000 000000 000000 00	  0   0  0

...

  [ 7] .nv.shared._Z18hi NOBITS		  00000000 000a81 001800 00  WA  0   4  4	  

...

Size of shared memory is 01800 (6144 bytes). There is no need to look in the (undocumented) .nv.info sections for this .