- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm thinking of writing some notification in the phase 3 executable in a PGO optimized application on Linux. Exactly speaking, I just want to add one line "fprintf(stderr,"some info about what I did on instrumented executions...how many times, how about the results, etc.");"
Does it affect the PGO? As far as I hexdumped *.dyn files, they seem (just a guess) to hold the file names and a function name associated with each of them (and maybe when, how many times, etc..) So I suppose it doesn't matter...at least in phase 1,2, IPO isn't enabled...
But to make it sure, I put "fprintf(stderr,"blah blah");" in phase 1, and will just modify the string in fprintf in phase 3. I don't think it affects PGO.
So will anyone tell me what modifications in the source affects PGO and what doesn't?
Thanks in advance!
Does it affect the PGO? As far as I hexdumped *.dyn files, they seem (just a guess) to hold the file names and a function name associated with each of them (and maybe when, how many times, etc..) So I suppose it doesn't matter...at least in phase 1,2, IPO isn't enabled...
But to make it sure, I put "fprintf(stderr,"blah blah");" in phase 1, and will just modify the string in fprintf in phase 3. I don't think it affects PGO.
So will anyone tell me what modifications in the source affects PGO and what doesn't?
Thanks in advance!
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe there's a check in the compiler to see if the number of internal basic blocks have changed between the code when -prof_gen was usedand the code when -prof_use is called. Adding a function call to a routine would result in an extra basic block being added so I believe (if I understand your thread correctly) you would not be able to reuse a profile if you added an additional call to a function during the -prof_use phase.
I suppose you could always try a simple testcase and find out. You'll get a diagnostic if the -prof_use phase cannot use the profile.
Max
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. I tried and found adding a function didn't work, but modifying the string in fprintf would be fine.
Thank you very much!!
Thank you very much!!
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page