where is the code about sending command getblocks in bitcoin source code I am reading the protocol part. One silly question. I found the part processing getblocks part, but i did not find when and where to send the getblocks command.Or it is deleted in the new bitcoin edition.  Any idea, I will appreciate it very much.
You're correct: the Bitcoin Core master branch no longer sends the getblocks message because it uses headers-first synchronization to get all the headers (with the getheaders message), allowing it to hash the headers itself, verify their proof-of-work, and request the corresponding blocks in parallel from multiple peers with getdata messages.  I believe the upcoming version 0.10 branch is supposed to be forked off of the master branch later today.  (Will update answer with link when that happens.)

Here are some direct code links:


Bitcoin Core 0.9.3 sends the getblocks message with this line.  That function is defined here.
In the master branch, this is the patch that replaced the line above


Bitcoin Core version 0.10 will continue to process the getblocks message from remote peers, as you note.