JP2000122877A - Method for arranging program code - Google Patents

Method for arranging program code

Info

Publication number
JP2000122877A
JP2000122877A JP10296486A JP29648698A JP2000122877A JP 2000122877 A JP2000122877 A JP 2000122877A JP 10296486 A JP10296486 A JP 10296486A JP 29648698 A JP29648698 A JP 29648698A JP 2000122877 A JP2000122877 A JP 2000122877A
Authority
JP
Japan
Prior art keywords
program
data
speed
function
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP10296486A
Other languages
Japanese (ja)
Inventor
Masaaki Funama
政昭 船間
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP10296486A priority Critical patent/JP2000122877A/en
Publication of JP2000122877A publication Critical patent/JP2000122877A/en
Pending legal-status Critical Current

Links

Landscapes

  • Devices For Executing Special Programs (AREA)

Abstract

PROBLEM TO BE SOLVED: To improve the execution speed of a program by arranging a function and data which are actually and frequently used in a high speed built-in RAM. SOLUTION: This method compiles a source program 1 to generate an object program 3, executes the program 3 to acquire profile information 5 where dynamic information for the case the program is executed is recorded, analyzes the information 5 to decide a speeding-up object section, selects a function and data which are frequently referred to in the speeding-up object section, generates a source program 2 where a replacement code is inserted to a part being the head of the speeding-up object section, which code is for transferring the selected function and data to the high speed built-in RAM so as to replace the contents of the RAM and compiles the program 2 to generate an object program 4.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】この発明は、プログラムのコ
ード配置方法に関し、特にデータの読み出し、書き込み
および命令の実行を高速に行うことのできる高速内蔵R
AMを有するコンピュータにおけるプログラムのコード
配置方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method of arranging a program code, and more particularly, to a high-speed built-in R which can perform high-speed data reading, writing and instruction execution.
The present invention relates to a method for arranging a program code in a computer having an AM.

【0002】[0002]

【従来の技術】現在のコンピュータにおいては、CPU
のメモリ空間の一部に、高速にデータの読み出し、書き
込みおよび命令の実行が可能な高速内蔵RAMを有する
ものが多くなってきている。高速内蔵RAMが設けられ
ているコンピュータでは、メモリ管理が自動的に行わ
れ、高速内蔵RAMに空き領域がある限り、変数が全て
高速内蔵RAMに割り付けられるか、または、ユーザに
よりメモリ管理を行い、高速内蔵RAMに対して配置し
たい変数を明示的に指定することにより、指定された変
数が高速内蔵RAMに配置されている。
2. Description of the Related Art In a current computer, a CPU is used.
Many of the memory spaces have a high-speed built-in RAM capable of reading and writing data and executing instructions at high speed. In a computer provided with a high-speed internal RAM, memory management is automatically performed, and all variables are assigned to the high-speed internal RAM, or memory management is performed by a user, as long as there is free space in the high-speed internal RAM. By explicitly specifying a variable to be allocated to the high-speed internal RAM, the specified variable is allocated to the high-speed internal RAM.

【0003】このようなCPUのメモリ空間の一部に高
速内蔵RAMを有するコンピュータ用のプログラムを開
発するユーザにおいては、この高速内蔵RAMを有効利
用することによる、オブジェクトプログラムの実行速度
の向上が期待されている。
A user who develops a computer program having a high-speed internal RAM in a part of the memory space of the CPU is expected to improve the execution speed of an object program by effectively using the high-speed internal RAM. Have been.

【0004】高速内蔵RAMを有効利用する方法として
特開平9−44363号公報には、プログラムの入力コ
ードを静的に解析し、その解析結果から高速内臓RAM
へ配置するコードおよびデータを選択した上で、それら
を動的に配置するためのコードを挿入する方法が示され
ている。その構成は図8に示すとおりである。
Japanese Patent Application Laid-Open No. 9-44363 discloses a method for effectively utilizing a high-speed internal RAM, in which a program input code is statically analyzed, and a high-speed internal RAM is analyzed from the analysis result.
The figure shows a method of selecting code and data to be placed in the storage device and inserting a code for dynamically placing them. Its configuration is as shown in FIG.

【0005】まず、ソースファイル101を入力とし
て、入力部104と構文解析部105により静的にソー
スファイルの解析を行う。この解析結果を用いて、配置
指定情報出力部106にて、高速内臓RAMに配置する
ことで高速化を図れるコードとデータを選択し(配置デ
ータ判別部109)、そのコードとデータを高速内蔵R
AMに転送する位置を決定し(入替え処理出力位置判別
部110)、最終的な結果として配置指定情報を配置指
定情報ファイル108として出力する(配置指定情報フ
ァイル出力部111)。
First, a source file 101 is input, and an input unit 104 and a syntax analysis unit 105 statically analyze the source file. Using the analysis result, the arrangement designation information output unit 106 selects codes and data that can be speeded up by arranging them in a high-speed internal RAM (arrangement data discrimination unit 109).
The position to be transferred to the AM is determined (exchange processing output position discriminating unit 110), and as a final result, the arrangement designation information is output as the arrangement designation information file 108 (the arrangement designation information file output unit 111).

【0006】最後に、入力部104、構文解析部105
により得られたソースファイルの解析結果と配置指定情
報ファイル108を用いてオブジェクトコード出力部1
07にてオブジェクトファイル103を生成する。
Finally, an input unit 104, a syntax analysis unit 105
Code output unit 1 using the analysis result of the source file obtained by
At 07, an object file 103 is generated.

【0007】オブジェクトコード生成部107では、ま
ず、得られた配置指定情報ファイル108を配置指定情
報ファイル入力部112へ入力し、これを用いて入替え
出力部113にて高速内蔵RAMへの転送コードの挿入
を行い、最終的なオブジェクトファイルへの変換を行
う。
In the object code generation unit 107, first, the obtained arrangement designation information file 108 is inputted to the arrangement designation information file input unit 112, and the replacement output unit 113 uses this to output the transfer code to the high-speed internal RAM. Insert and convert to final object file.

【0008】[0008]

【発明が解決しようとする課題】上述した特開平9−4
4363号公報に示される方法では、高速内蔵RAMへ
配置するコードおよびデータを選択するために、ソース
プログラムの静的な解析のみを行い、実際にどのように
プログラムが実行されているかといった動的なプロファ
イル情報が利用されていないため、実際にはあまり利用
されないコードおよびデータが高速内蔵RAMに配置さ
れる可能性がある。これにより、高速内蔵RAMが無駄
に利用され、高速化の機会を逸してしまう可能性があ
る。
SUMMARY OF THE INVENTION The above-mentioned Japanese Patent Application Laid-open No. Hei 9-4
In the method disclosed in Japanese Patent No. 4363, only static analysis of a source program is performed in order to select code and data to be arranged in a high-speed internal RAM, and dynamic analysis such as how the program is actually executed is performed. Since the profile information is not used, there is a possibility that codes and data that are not actually used often are arranged in the high-speed internal RAM. As a result, the high-speed built-in RAM is wasted, and there is a possibility that the opportunity to increase the speed is missed.

【0009】この発明の目的は、実際に頻繁に使用する
関数およびデータを高速内蔵RAMに配置することによ
りプログラムの実行速度を向上させることのできるプロ
グラムのデータ配置方法を提供することにある。
An object of the present invention is to provide a program data arranging method which can improve the execution speed of a program by arranging functions and data that are actually frequently used in a high-speed internal RAM.

【0010】[0010]

【課題を解決するための手段】この発明は、CPUのメ
モリ空間内に高速内蔵RAMが配置されたコンピュータ
システムにおけるプログラムのコード配置方法におい
て、ソースプログラムをコンパイルしてオブジェクトプ
ログラムを生成し、オブジェクトプログラムを実行して
プログラム実行時の動的な情報を記録したプロファイル
情報を取得し、前記プロファイル情報を利用して高速化
対象区間を決定し、前記高速化対象区間内で頻繁に参照
される関数、データを選択し、前記高速化対象区間の先
頭となる部分に、選択された関数、データを前記高速内
蔵RAMに転送し高速内蔵RAMの内容を入れ替えるた
めの入れ替えコードを挿入したソースプログラムを生成
し、入れ替えコードを挿入したソースプログラムをコン
パイルしてオブジェクトプログラムを生成することを特
徴とする。
SUMMARY OF THE INVENTION The present invention relates to a method of arranging a program in a computer system in which a high-speed internal RAM is arranged in a memory space of a CPU. To obtain profile information recording dynamic information at the time of program execution, determine a speed-up target section using the profile information, a function frequently referred to in the speed-up target section, A source program in which data is selected and a replacement code for transferring the selected function and data to the high-speed internal RAM and exchanging the contents of the high-speed internal RAM is generated at the beginning of the high-speed target section. Compiles the source program with the replacement code And generating a preparative program.

【0011】[0011]

【発明の実施の形態】次に、この発明の実施の形態につ
いて図面を参照して説明する。
Next, an embodiment of the present invention will be described with reference to the drawings.

【0012】図1は、この発明のプログラム配置方法の
実施の形態を示す流れ図である。図1において、まず、
ソースプログラム1をコンパイルしてオブジェクトプロ
グラム3を生成し、次に、このオブジェクトプログラム
3を実行することによりプログラムの実行時の情報を記
録したプロファイル情報5を得る。
FIG. 1 is a flowchart showing an embodiment of the program arrangement method of the present invention. In FIG. 1, first,
The object program 3 is generated by compiling the source program 1, and then the object program 3 is executed to obtain profile information 5 which records information at the time of execution of the program.

【0013】次に、このプロファイル情報5を利用し
て、高速化対象区間内で頻繁に参照される関数、データ
を検出し、これらを実行高速化のために高速内蔵RAM
に配置すべき関数とデータとして選択し、その配置情報
6と実行時にそれぞれの区間の直前に高速内蔵RAMの
内容を入れ替えるためのコードを挿入したソースプログ
ラム2を生成する。
Next, by using the profile information 5, functions and data that are frequently referred to in the section to be accelerated are detected, and these are stored in a high-speed internal RAM to speed up the execution.
And a source program 2 in which a code for replacing the contents of the high-speed built-in RAM is inserted immediately before each section at the time of execution, with the function and data to be arranged.

【0014】最後に、高速内蔵RAMの内容を入れ替え
るためのコードを挿入したソースプログラム2をコンパ
イルし、リンカに配置情報6を与え、最終的なオブジェ
クトプログラム4を得る。
Finally, the source program 2 into which the code for replacing the contents of the high-speed internal RAM has been inserted is compiled, the arrangement information 6 is given to the linker, and the final object program 4 is obtained.

【0015】次に、この発明のプログラム配置方法の動
作について、図1および図2を参照して詳細に説明す
る。図2は、図1における関数、データ配置情報作成お
よび入れ替えコード挿入の処理を詳細に説明する流れ図
である。
Next, the operation of the program arrangement method of the present invention will be described in detail with reference to FIGS. FIG. 2 is a flowchart for explaining in detail the functions, data arrangement information creation, and replacement code insertion processing in FIG.

【0016】まず、ソースプログラム1を作成し、コン
パイラを用いてソースプログラム1からオブジェクトプ
ログラム3を得る。
First, a source program 1 is created, and an object program 3 is obtained from the source program 1 using a compiler.

【0017】次に、オブジェクトプログラム3をシミュ
レータもしくはターゲットマシン上で実行することによ
り、データアクセス頻度や関数の実行軌跡などのプログ
ラム実行時の動的な情報を記録したプロファイル情報5
を得る。
Next, by executing the object program 3 on a simulator or a target machine, profile information 5 which records dynamic information at the time of program execution, such as data access frequency and function execution trajectory, is recorded.
Get.

【0018】プロファイル情報とは、具体的には、関数
については関数の実行遷移をトレースした関数の実行遷
移情報であり、データについては実行時間を一定区間で
区切り、その間のそれぞれの変数の参照回数(アクセス
回数)を記録するデータ参照情報である。図3は、関数
の実行遷移情報の一例を示す図であり、図4は、データ
参照情報の一例を示す図である。
The profile information is, specifically, a function execution transition information obtained by tracing a function execution transition for a function. For data, the execution time is divided into certain intervals, and the number of times of reference to each variable during the interval is divided. This is data reference information for recording (access count). FIG. 3 is a diagram illustrating an example of function execution transition information, and FIG. 4 is a diagram illustrating an example of data reference information.

【0019】ここで、プロファイル情報の取得方法につ
いて説明する。プロファイル情報を取得する方法には、
プローブコードを埋め込む方法と、シミュレータを利用
する方法がある。
Here, a method of acquiring profile information will be described. To get profile information,
There is a method of embedding the probe code and a method of using a simulator.

【0020】プローブコードを埋め込む方法では、関数
の場合は、全関数の入口と出口にプローブコードの呼び
出しコードを挿入し、プローブコードは入口で呼ばれた
場合、その関数の実行開始を記録し、出口ではその関数
の実行終了をメモリ中のデータもしくはファイルとし
て、その時の時刻と共に記録することにより関数の実行
遷移情報を得る。
In the method of embedding the probe code, in the case of a function, a call code of the probe code is inserted at the entry and exit of all functions, and when the probe code is called at the entry, the execution start of the function is recorded, At the exit, execution transition information of the function is obtained by recording the execution end of the function as data or a file in the memory together with the time at that time.

【0021】データの場合は、各データへの参照命令の
直前にプローブコードの呼び出しコードを挿入し(これ
らの命令はデータ参照時に必ず実行される)、プローブ
コードが各期間におけるそのデータの参照回数を計数す
ることによりデータ参照情報を得る。
In the case of data, a call code of a probe code is inserted immediately before a reference instruction to each data (these instructions are always executed at the time of referring to data), and the number of times the probe code refers to the data in each period. To obtain data reference information.

【0022】シミュレータを利用する方法では、関数の
場合は、命令に関するシミュレータの機能を利用して関
数呼び出し命令および関数からの戻り命令の実行を監視
し、上記と同じ情報を記録することにより関数の実行遷
移情報を得る。関数の特定は、その呼び出しアドレスを
記録しておくことで可能である。
In the method using a simulator, in the case of a function, the execution of a function call instruction and a return instruction from a function are monitored by using the simulator function relating to the instruction, and the same information as described above is recorded to record the function. Obtain execution transition information. A function can be specified by recording its call address.

【0023】データの場合は、特定のアドレスへのアク
セスを監視するシミュレータの機能を利用してデータの
配置されているアドレスへのアクセス(読み込み、書き
込み)を監視し、アクセスがあった場合、特定の割り込
みがかかるようにし、この割り込みによりプローブコー
ドを呼び出し、上記の場合と同じ情報を記録することに
よりデータ参照情報を得る。
In the case of data, access (reading and writing) to the address where the data is located is monitored by using the function of a simulator for monitoring access to a specific address. , The probe code is called by this interrupt, and the same information as in the above case is recorded to obtain data reference information.

【0024】次に、このプロファイル情報5を利用して
高速化対象区間の決定を行う。高速化対象区間の決定
は、ユーザが、プロファイル情報5を見て、高速化の必
要な区間を指定するか、または、特定の関数(1〜4個
程度)が区間実行時間のある一定割合を占めているよう
な区間、および変数の参照回数が一定回数を超える区間
を自動的に指定することにより行う。
Next, a section to be speeded up is determined using the profile information 5. To determine the section to be speeded up, the user looks at the profile information 5 and specifies a section that needs to be speeded up, or a specific function (about 1 to 4) determines a certain percentage of the section execution time. This is performed by automatically designating a section that is occupied and a section in which the number of reference times of a variable exceeds a certain number.

【0025】次に、各高速化対象区間のプロファイル情
報5を解析して、高速化対象区間内で頻繁に参照される
関数、データを検出し、これらを実行高速化のために高
速内蔵RAMに配置すべき関数、データとして選択し、
区間の先頭となる部分に、選択された関数、データを高
速内蔵RAMに転送し、高速内蔵RAMの内容を入れ替
えるための入れ替えコードを挿入したソースプログラム
2を生成する。
Next, the profile information 5 of each speed-up target section is analyzed to detect functions and data that are frequently referred to in the speed-up target section, and these are stored in a high-speed internal RAM for high-speed execution. Select the function and data to be placed,
At the beginning of the section, the selected function and data are transferred to the high-speed internal RAM, and a source program 2 in which a replacement code for replacing the contents of the high-speed internal RAM is inserted is generated.

【0026】ここで、プロファイル情報を利用して高速
内蔵RAMに配置すべき関数を選択する方法について図
5を用いて具体的に説明する。図5は、プログラムの実
行状況を関数の実行遷移情報で示した図である。
Here, a method for selecting a function to be allocated in the high-speed internal RAM using the profile information will be specifically described with reference to FIG. FIG. 5 is a diagram showing the execution status of a program by execution transition information of a function.

【0027】図5から、区間1では関数Func_A、
Func_Bが交互に実行されており、また、区間2で
は関数Func_Zのみが実行されていることが分か
る。したがって、区間1では関数Func_A、Fun
c_Bが頻繁に利用されるものと判断し、区間2では関
数Func_Zが頻繁に利用されるものと判断し、それ
ぞれの区間の直前に高速内蔵RAMに転送する関数の対
象とし、それぞれの区間の直前となるようなプログラム
の部分に転送用の入れ替えコードを挿入する。
From FIG. 5, in section 1, the functions Func_A,
It can be seen that Func_B is executed alternately, and in section 2, only the function Func_Z is executed. Therefore, in section 1, the functions Func_A, Func_A
It is determined that c_B is frequently used, and that the function Func_Z is determined to be frequently used in the section 2, and is set as a target of a function to be transferred to the high-speed internal RAM immediately before each section. Insert the exchange code for transfer into the part of the program that

【0028】転送用の入れ替えコードの挿入は、高速内
蔵RAMへの転送のオーバヘッドがかかるため、転送コ
ストに見合う高速化が得られるか否かを判断し、十分な
高速化が得られると判断した場合にのみ行う。また、こ
の入れ替えコードには、ブロック転送命令コードまたは
DMA(ダイレクトメモリアクセス)転送命令コードを
用いることができる。入れ替えコード挿入の具体例を図
6に示す。
Since the insertion of the transfer replacement code involves the overhead of the transfer to the high-speed built-in RAM, it is determined whether or not the speed can be increased corresponding to the transfer cost, and it is determined that the sufficient speed can be obtained. Only do it if. Further, a block transfer instruction code or a DMA (direct memory access) transfer instruction code can be used as the replacement code. FIG. 6 shows a specific example of the replacement code insertion.

【0029】なお、以上の説明では、関数の再配置に関
して述べたが、データに関しても同様である。
In the above description, the relocation of functions has been described, but the same applies to data.

【0030】次に、関数およびデータをそれぞれ一つに
まとめて配置された関数およびデータエリアを設け、入
れ替えるときに関数およびデータをそれぞれ一度にまと
めて入れ替えることができるようにする配置情報6を作
成する。
Next, there is provided a function and data area in which functions and data are arranged collectively, respectively, and arrangement information 6 is created which enables the functions and data to be exchanged together at a time. I do.

【0031】まとめて置かれた関数およびデータは、そ
のまとまり毎にインデックス番号が割り当てられる。高
速内蔵RAMの入れ替えを行う時には、このインデック
ス番号をパラメータとして指定し、入れ替え用ルーチン
を呼び出す。入れ替えを行うルーチンには、インデック
ス番号がメモリ上のどの領域に該当するかを記録した以
下のようなテーブルデータも含まれる。
The functions and data placed together are assigned an index number for each unit. When replacing the high-speed internal RAM, the index number is designated as a parameter, and a replacement routine is called. The replacement routine also includes the following table data that records which area in the memory the index number corresponds to.

【0032】 入れ替え時には、指定されたインデックス番号の示す領
域に配置された関数もしくはデータが高速内蔵RAMに
転送される。
[0032] At the time of replacement, the function or data arranged in the area indicated by the designated index number is transferred to the high-speed internal RAM.

【0033】配置情報6には、配置対象となった関数お
よびデータが指定のインデックス番号の示す領域に配置
されるよう、リンカに指示を与えるものである。
The arrangement information 6 gives an instruction to the linker so that functions and data to be arranged are arranged in the area indicated by the designated index number.

【0034】図7は、関数エリア内のインデックス(I
D:1,ID:2,ID:3)と高速内蔵RAMとの関
係を示す図である。
FIG. 7 shows an index (I) in the function area.
FIG. 2 is a diagram showing a relationship between D: 1, ID: 2, ID: 3) and a high-speed internal RAM.

【0035】最後に、高速内蔵RAMへの転送用の入れ
替えコードが挿入されたソースプログラム2をコンパイ
ルし、リンカに配置情報6を与え、最終的なオブジェク
トプログラム4を得る。
Finally, the source program 2 into which the exchange code for transfer to the high-speed internal RAM has been inserted is compiled, the arrangement information 6 is given to the linker, and the final object program 4 is obtained.

【0036】[0036]

【発明の効果】以上説明したように、この発明は、オブ
ジェクトプログラムの動的な実行状況から得られたプロ
ファイル情報を用いて高速化の必要な関数およびデータ
を実行時に高速内蔵RAMに配置することにより、関数
およびデータへのアクセスを高速化することができ、プ
ログラムの実行速度を向上させることができる。
As described above, according to the present invention, functions and data that need to be accelerated are arranged in a high-speed internal RAM at the time of execution by using profile information obtained from a dynamic execution state of an object program. Accordingly, access to functions and data can be speeded up, and the execution speed of a program can be improved.

【図面の簡単な説明】[Brief description of the drawings]

【図1】この発明のプログラム配置方法の実施の形態を
示す流れ図である。
FIG. 1 is a flowchart showing an embodiment of a program arrangement method according to the present invention.

【図2】関数、データ配置情報作成および高速内蔵RA
M転送コード挿入の処理を詳細に説明する流れ図であ
る。
FIG. 2 shows functions, data arrangement information creation, and high-speed built-in RA
It is a flowchart explaining in detail the process of M transfer code insertion.

【図3】関数の実行遷移情報の一例を示す図である。FIG. 3 is a diagram illustrating an example of execution transition information of a function;

【図4】データ参照情報の一例を示す図である。FIG. 4 is a diagram illustrating an example of data reference information.

【図5】プログラムの実行状況を関数の実行遷移情報で
示す図である。
FIG. 5 is a diagram showing a program execution status by function transition information;

【図6】入れ替えコード挿入の具体例を示す図である。FIG. 6 is a diagram showing a specific example of insertion of a replacement code.

【図7】関数エリア内のインデックスと高速内蔵RAM
との関係を示す図である。
FIG. 7: Index in function area and high-speed internal RAM
FIG.

【図8】高速内蔵RAMを有効利用する従来方法を示す
図である。
FIG. 8 is a diagram showing a conventional method for effectively utilizing a high-speed internal RAM.

【符号の説明】[Explanation of symbols]

1,2 ソースプログラム 3,4 オブジェクトプログラム 5 プロファイル情報 6 配置情報 1, 2 Source program 3, 4 Object program 5 Profile information 6 Placement information

Claims (7)

【特許請求の範囲】[Claims] 【請求項1】CPUのメモリ空間内に高速内蔵RAMが
配置されたコンピュータシステムにおけるプログラムの
コード配置方法において、 オブジェクトプログラム実行時の動的な情報を記録した
プロファイル情報を用いて高速化の必要な関数およびデ
ータを選択し、オブジェクトプログラム実行時に前記選
択した関数およびデータを前記高速内蔵RAMに配置す
る命令コードをソースプログラムに挿入することを特徴
とするプログラムのコード配置方法。
In a method of arranging a program in a computer system in which a high-speed internal RAM is arranged in a memory space of a CPU, it is necessary to increase the speed by using profile information which records dynamic information at the time of executing an object program. A code arrangement method for a program, comprising selecting a function and data, and inserting, into a source program, an instruction code for arranging the selected function and data in the high-speed internal RAM when an object program is executed.
【請求項2】CPUのメモリ空間内に高速内蔵RAMが
配置されたコンピュータシステムにおけるプログラムの
コード配置方法において、 ソースプログラムをコンパイルしてオブジェクトプログ
ラムを生成し、 オブジェクトプログラムを実行してプログラム実行時の
動的な情報を記録したプロファイル情報を取得し、 前記プロファイル情報を利用して高速化対象区間を決定
し、 前記高速化対象区間内で頻繁に参照される関数、データ
を選択し、 前記高速化対象区間の先頭となる部分に、選択された関
数、データを前記高速内蔵RAMに転送し高速内蔵RA
Mの内容を入れ替えるための入れ替えコードを挿入した
ソースプログラムを生成し、 入れ替えコードを挿入したソースプログラムをコンパイ
ルしてオブジェクトプログラムを生成することを特徴と
するコンピュータプログラムのコード配置方法。
2. A method for arranging a program in a computer system in which a high-speed internal RAM is arranged in a memory space of a CPU, wherein a source program is compiled to generate an object program, and the object program is executed to execute the Obtaining profile information in which dynamic information is recorded; determining a speed-up target section using the profile information; selecting a function and data that are frequently referred to in the speed-up target section; The selected function and data are transferred to the high-speed internal RAM at the beginning of the target section, and the high-speed internal RA
A code placement method for a computer program, comprising: generating a source program in which a replacement code for replacing the contents of M is inserted; and compiling the source program in which the replacement code is inserted to generate an object program.
【請求項3】前記高速内蔵RAMに転送し入れ替える関
数およびデータがそれぞれ一つにまとめて配置される関
数およびデータエリアを設け、入れ替え時に関数および
データをそれぞれ一度にまとめて入れ替えることができ
るようにする配置情報を作成し、前記入れ替えコードが
挿入されたソースプログラムをコンパイルし、リンカに
前記配置情報を与え、最終的なオブジェクトプログラム
を得ることを特徴とする請求項2に記載のプログラムの
コード配置方法。
3. A function and data area in which functions and data to be transferred to and exchanged with the high-speed internal RAM are collectively arranged, respectively, so that the functions and data can be exchanged all at once at the time of exchange. 3. The code arrangement of the program according to claim 2, wherein the arrangement information to be created is compiled, the source program into which the replacement code is inserted is compiled, the arrangement information is given to a linker, and a final object program is obtained. Method.
【請求項4】前記プロファイル情報は、関数の場合は関
数の実行遷移をトレースした関数の実行遷移情報であ
り、データの場合は実行時間を一定区間で区切り各一定
区間での変数の参照回数を記録するデータ参照情報であ
ることを特徴とする請求項2または3に記載のプログラ
ムのコード配置方法。
4. The profile information is, in the case of a function, execution transition information of a function obtained by tracing the execution transition of the function. In the case of data, the profile information divides the execution time into fixed sections and indicates the number of times of reference to a variable in each fixed section. 4. The method according to claim 2, wherein the information is data reference information to be recorded.
【請求項5】前記高速化対象区間の決定は、ユーザが、
前記プロファイル情報を解析して、転送オーバヘッドを
含めても高速実行できる区間を指定して行うことを特徴
とする請求項2〜4のいずれかに記載のプログラムのコ
ード配置方法。
5. The determination of the high-speed target section is performed by a user
The method according to claim 2, wherein the profile information is analyzed to specify a section that can be executed at high speed even when transfer overhead is included.
【請求項6】前記高速化対象区間の決定は、前記プロフ
ァイル情報を解析して、特定の関数が区間実行時間のあ
る一定割合を占めている区間、および変数の参照回数が
一定回数を超える区間を自動的に指定することにより行
うことを特徴とする請求項2〜4のいずれかに記載のプ
ログラムのコード配置方法。
6. The determination of the high-speed target section is performed by analyzing the profile information to determine a section in which a specific function occupies a certain percentage of the section execution time and a section in which the number of times of reference to a variable exceeds a certain number of times. The method according to any one of claims 2 to 4, wherein the method is automatically specified.
【請求項7】前記入れ替えコードは、ブロック転送命令
コードまたはDMA転送命令コードであることを特徴と
する請求項2〜6のいずれかに記載のプログラムのコー
ド配置方法。
7. The method according to claim 2, wherein the replacement code is a block transfer instruction code or a DMA transfer instruction code.
JP10296486A 1998-10-19 1998-10-19 Method for arranging program code Pending JP2000122877A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10296486A JP2000122877A (en) 1998-10-19 1998-10-19 Method for arranging program code

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10296486A JP2000122877A (en) 1998-10-19 1998-10-19 Method for arranging program code

Publications (1)

Publication Number Publication Date
JP2000122877A true JP2000122877A (en) 2000-04-28

Family

ID=17834188

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10296486A Pending JP2000122877A (en) 1998-10-19 1998-10-19 Method for arranging program code

Country Status (1)

Country Link
JP (1) JP2000122877A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011076218A (en) * 2009-09-29 2011-04-14 Fujitsu Ltd Method for generating program and method for operating system
JP2015207318A (en) * 2008-12-01 2015-11-19 ケーピーアイティ テクノロジーズ リミテッド Method and system for parallelization of sequential computer program codes

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015207318A (en) * 2008-12-01 2015-11-19 ケーピーアイティ テクノロジーズ リミテッド Method and system for parallelization of sequential computer program codes
JP2011076218A (en) * 2009-09-29 2011-04-14 Fujitsu Ltd Method for generating program and method for operating system

Similar Documents

Publication Publication Date Title
US7178134B2 (en) Method and apparatus for resolving memory allocation trace data in a computer system
US5528753A (en) System and method for enabling stripped object software monitoring in a computer system
US6434714B1 (en) Methods, systems, and articles of manufacture for analyzing performance of application programs
US6308323B1 (en) Apparatus and method for compiling a plurality of instruction sets for a processor and a media for recording the compiling method
US5815720A (en) Use of dynamic translation to collect and exploit run-time information in an optimizing compilation system
US9430353B2 (en) Analysis and visualization of concurrent thread execution on processor cores
JP5209059B2 (en) Source code processing method, system, and program
US6725448B1 (en) System to optimally create parallel processes and recording medium
JP2500079B2 (en) Program optimization method and compiler system
US6360360B1 (en) Object-oriented compiler mechanism for automatically selecting among multiple implementations of objects
CN101957773A (en) Be used for method and system thereof that many rounds dynamic summary is analyzed
CN113742119A (en) Call stack backtracking method and device of embedded system and computer equipment
US20060101437A1 (en) Data processing device and method
JPH09212369A (en) Storage area allocation device
JP2000122877A (en) Method for arranging program code
US6134708A (en) Program compilation execution system
JP2003271394A (en) Device for arranging and allocating function and basic block and program for optimizing allocation
JPH01118931A (en) Program conversion system
US20080126767A1 (en) Method and Apparatus for Obtaining Stack Traceback Data for Multiple Computing Nodes of a Massively Parallel Computer System
US8402445B2 (en) Program translation method and notifying instruction inserting method
CN113721984B (en) Decoupled GPDSP assembly patterning method and system
Berson et al. GURRR: A global unified resource requirements representation
US20110099329A1 (en) Analysis and timeline visualization of storage channels
US20070266230A1 (en) Information processing method and instruction generating method
JP3060907B2 (en) Processing method of language processing program