发明名称 Preprocessing kernel print commands
摘要 Methods, apparatus and computer program products implement embodiments of the present invention that include replacing, in one or more initial source code files, each reference to a first function configured to convey system messages with a respective reference to a second function configured to convey the system messages, thereby producing respective corresponding preprocessed source code files for the one or more initial source code files. The respective corresponding preprocessed source code files are then compiled, thereby creating an executable file. While executing the executable file, a call to the second function is received, wherein the call includes a text string. A name of one of the respective corresponding preprocessed source code files storing the call to the second function is identified, and based on the identified name and the text string, a computed destination is determined for the text string. Finally, the text string is conveyed to the computed destination.
申请公布号 US9158513(B2) 申请公布日期 2015.10.13
申请号 US201314010737 申请日期 2013.08.27
申请人 INTERNATIONAL BUSINESS MACHINES CORPORATION 发明人 Girouard Janice M.;Shiran Yehuda
分类号 G06F9/45;G06F11/36;G06F9/44 主分类号 G06F9/45
代理机构 Griffiths & Seaton PLLC 代理人 Griffiths & Seaton PLLC
主权项 1. A method, comprising: replacing, in one or more initial source code files, each reference to a first function configured to convey operating system kernel log messages with a respective reference to a second function configured to convey the operating system kernel log messages, thereby producing respective corresponding preprocessed source code files for the one or more initial source code files; compiling the respective corresponding preprocessed source code files, thereby creating an operating system kernel; prior to executing the operating system kernel: identifying, in a given respective corresponding preprocessed source code file, a given reference to the second function call having a respective message text, the given respective corresponding preprocessed source code file having a given file name,calculating, using the given file name and the respective message text, a configuration checksum,assigning a respective destination to the configuration checksum,adding a record to a configuration file stored on a storage device coupled to the processor,storing, to the added record, the respective destination and a key comprising the configuration checksum, andloading the record to an entry in a configuration table stored in a memory coupled to the processor; and while executing the operating system kernel: receiving, by the processor, a call to the second function, the call comprising a text string;identifying a name of one of the respective corresponding preprocessed source code files storing the call to the second function;determining, based on the identified name and the text string, a computed destination for the text string, including calculating, using the identified name and the text string, a message checksum, and identifying, in the configuration table, an entry having a key equal to the message checksum, and wherein the determined destination comprises the respective destination in the identified entry; andconveying the text string to the computed destination.
地址 Armonk NY US