Multipathing for source code execution
View Patent ↗Techniques and methods for generating multiple paths of execution during the compilation process are provided. One or more portions of a software-based task to be executed are identified. A plurality of segments of compiled code for executing the identified one or more portions of the software-based task are generated. Errors during execution of a first segment of compiled code from the plurality of segments of compiled code are monitored. Upon detecting an error in the first segment of compiled code, a second segment of compiled code from the plurality of segments of compiled code is executed.
1 . A method comprising:
identifying one or more portions of a software-based task to be executed;
generating a plurality of segments of compiled code for executing the identified one or more portions of the software-based task, comprising:
determining one or more compilers and, for each determined compiler, one or more compiler optimization settings, each optimization setting corresponding to a respective optimization level,
generating a first set of compiled code by applying the determined one or more compilers and the corresponding one or more compiler optimization settings to the one or more portions of the software-based task,
identifying logically independent code segments within the one or more portions of the software-based task, and
generating a second set of compiled code by altering an order of execution for the identified logically independent code segments to generate the plurality of segments of compiled code, wherein the plurality of segments of compiled code comprises the first and second sets of compiled code;
monitoring for errors during execution of a first segment of compiled code from the plurality of segments of compiled code; and
upon detecting an error in the first segment of compiled code, executing a second segment of compiled code from the plurality of segments of compiled code.
2 . The method of claim 1 , wherein the one or more portions of the software-based task are designed for concurrent execution.
3 . The method of claim 1 , wherein each of the plurality of segments of compiled code results in different timing when executed.
4 . The method of claim 1 , wherein each of the plurality of segments of compiled code comprises a different sequence of instructions.
5 . The method of claim 1 , wherein the plurality of segments of compiled code are generated by a plurality of compilers, each respective path being generated by a respective compiler of the plurality of compilers.
6 . The method of claim 1 , wherein the plurality of segments of compiled code are generated using a single compiler with a plurality of optimization settings, each respective path being generated by a respective optimization setting of the plurality of optimization settings.
7 . The method of claim 1 , wherein
the one or more compiler optimization settings comprises at least one of:
a first optimization setting corresponding to no optimization,
a second optimization setting corresponding to basic optimization,
a third optimization setting corresponding to full optimization, and
a fourth optimization setting corresponding to maximum optimization.
8 . A system comprising:
one or more memories collectively storing computer-executable instructions; and
one or more processors configured to collectively execute the computer-executable instructions and cause the system to perform an operation, the operation comprising:
identifying one or more portions of a software-based task to be executed;
generating a plurality of segments of compiled code for executing the identified one or more portions of the software-based task, comprising:
determining one or more compilers and, for each determined compiler, one or more compiler optimization settings, each optimization setting corresponding to a respective optimization level,
generating a first set of compiled code by applying the determined one or more compilers and the corresponding one or more compiler optimization settings to the one or more portions of the software-based task,
identifying logically independent code segments within the one or more portions of the software-based task, and
generating a second set of compiled code by altering an order of execution for the identified logically independent code segments to generate the plurality of segments of compiled code, wherein the plurality of segments of compiled code comprises the first and second sets of compiled code;
monitoring for errors during execution of a first segment of compiled code from the plurality of segments of compiled code; and
upon detecting an error in the first segment of compiled code, executing a second segment of compiled code from the plurality of segments of compiled code.
9 . The system of claim 8 , wherein the one or more portions of the software-based task are designed for concurrent execution.
10 . The system of claim 8 , wherein each of the plurality of segments of compiled code results in different timing when executed.
11 . The system of claim 8 , wherein each of the plurality of segments of compiled code comprises a different sequence or order of instructions.
12 . The system of claim 8 , wherein the plurality of segments of compiled code are generated by a plurality of compilers, each respective path being generated by a respective compiler of the plurality of compilers.
13 . The system of claim 8 , wherein the plurality of segments of compiled code are generated using a single compiler with a plurality of optimization settings, each respective path being generated by a respective optimization setting of the plurality of optimization settings.
14 . The system of claim 8 , wherein
the one or more compiler optimization settings comprises at least one of:
a first optimization setting corresponding to no optimization,
a second optimization setting corresponding to basic optimization,
a third optimization setting corresponding to full optimization, and
a fourth optimization setting corresponding to maximum optimization.
15 . A computer program product, comprising:
a computer-readable storage medium having computer-readable program code executable to cause the computer program product to perform an operation, the operation comprising:
identifying one or more portions of a software-based task to be executed;
generating a plurality of segments of compiled code for executing the identified one or more portions of the software-based task, comprising:
determining one or more compilers and, for each determined compiler, one or more compiler optimization settings, each optimization setting corresponding to a respective optimization level,
generating a first set of compiled code by applying the determined one or more compilers and the corresponding one or more compiler optimization settings to the one or more portions of the software-based task,
identifying logically independent code segments within the one or more portions of the software-based task, and
generating a second set of compiled code by altering an order of execution for the identified logically independent code segments to generate the plurality of segments of compiled code, wherein the plurality of segments of compiled code comprises the first and second sets of compiled code;
monitoring for errors during execution of a first segment of compiled code from the plurality of segments of compiled code; and
upon detecting an error in the first segment of compiled code, executing a second segment of compiled code from the plurality of segments of compiled code; and
one or more processors, each processor of which is configured to execute at least a respective portion of the computer-readable program code.
16 . The computer program product of claim 15 , wherein each of the plurality of segments of compiled code results in different timing when executed.
17 . The computer program product of claim 15 , wherein each of the plurality of segments of compiled code comprises a different sequence or order of instructions.
18 . The computer program product of claim 16 , wherein the plurality of segments of compiled code are generated by a plurality of compilers, each respective path being generated by a respective compiler of the plurality of compilers.
19 . The computer program product of claim 16 , wherein the plurality of segments of compiled code are generated using a single compiler with a plurality of optimization settings, each respective path being generated by a respective optimization setting of the plurality of optimization settings.
20 . The computer program product of claim 16 , wherein
the one or more compiler optimization settings comprises at least one of:
a first optimization setting corresponding to no optimization,
a second optimization setting corresponding to basic optimization,
a third optimization setting corresponding to full optimization, and
a fourth optimization setting corresponding to maximum optimization.