Characterization of Data Locality Potential of CPU and GPU Applications through Dynamic Analysis