1. A method, comprising: compiling bytecodes to generate native codes corresponding to the bytecodes in an electronic device; generating a file to include the bytecodes and the corresponding native codes in the file; collecting symbol information to map symbols in the bytecodes with offsets of corresponding native codes; and including the symbol information in the file to enable profiling.