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 that includes the bytecodes and the corresponding native codes and enables profiling by causing a profiling tool to interrupt periodically and obtain an address from a program counter and calculating an offset in a corresponding native code using the address and mapping the offset to symbols in the bytecodes.