> Actually at first glance, I think the cgraph_copy_node_for_versioning is just > confused. It pass edge own frequency as scale and it rescales count to 0 just > to set it back. > > Does something like this work? Yes it does. Will you take care of this on mainline so I can import it into the TM branch? Thanks for looking into this.