Hi folks,

Well, recently we have migrated the MIPS stuff to 64-bit builds and a funny problem has turned up. Unfortunately, it's one I have seen before. The symptom is that the static 64 bit build works fine, the shared build corrupts itself inside of pfm_get_event_name at the point of strncpy from pfm_current->get_event_name(i).

The debugger sees that this function returns a proper string. (break/ finish). I should point out that no level of debug fixes this. But the next line, strncpy gets corrupted pretty badly. In fact, the code ends up calling some other function.

While trying to debug this, I noticed something I've seen again and again. pfm_current is not visible by the debugger. No matter what I do, I can't see this variable. furthermore, various variables appear to be 'optimized out' even on code that has never seen a -O.

The only other time I've seen strangeness like this was in PAPI when a data structure had pointers to things that were const, but the data structure wasn't const itself. I haven't yet solved the problem in PFM, but I would love to hear from you guys with 64 bit builds.

Can you compile libpfm with -g and see 'pfm_current' with the debugger? (You'll have to modify config.mk to remove -O2)

We will have more data for you soon.

Phil
_______________________________________________
perfmon mailing list
[email protected]
http://www.hpl.hp.com/hosted/linux/mail-archives/perfmon/

Reply via email to