It's for both - providing an updated estimate for IFR traffic purposes and to alert VFR traffic to your impending entry into "G".
It doesn't really matter whether it's at top of descent or later - the idea is to do it before you get within 500ft of the highest level a VFR could be operating at. Ideally you'll transferred to the "G" frequency far enough before entering "G" to allow you to combine your report with the frequency transfer.
I'd suggest no later than 2 to 3 minutes before entering "G" would be good airmanship - gives other traffic a chance to assess and take action, and for the controller to reassess traffic.