2014-10-27 54 views
3

堆棧跟蹤例如:linux kernel dumpstack中「.clone」是什麼意思?

[<e50ff630>] adf_os_mem_alloc_outline+0x50/0x60 [adf] 
[<e50f4d20>] amalloc_private+0x40/0x80 [asf] 
[<e53f6508>] ieee80211_scan_entry_update.clone.2+0xac0/0xe18 [umac] 
[<e53f7080>] ieee80211_scan_table_update+0x41c/0x5b8 [umac] 
[<e53d0b98>] ieee80211_update_beacon+0x30/0x80 [umac] 
[<e53d0dec>] ieee80211_recv_mgmt+0x204/0x18a4 [umac] 
[<e5404cc8>] ieee80211_input+0x23c/0x1484 [umac] 
[<e5405fe8>] ieee80211_input_all+0xd8/0x158 [umac] 
[<e53c4abc>] ath_net80211_rx+0x764/0x77c [umac] 
[<e528f474>] ath_rx_indicate+0x60/0xc8 [ath_dev] 
[<e527bd2c>] ath_rx_process+0x1d4/0x5f8 [ath_dev] 
[<e528c080>] ath_rx_handler+0x408/0x5cc [ath_dev] 
[<e528c284>] ath_rx_edma_tasklet+0x40/0x68 [ath_dev] 
[<e528f404>] ath_handle_rx_intr+0x28/0x38 [ath_dev] 
[<e52714dc>] ath_handle_intr+0x25c/0x8c0 [ath_dev] 
[<e5409284>] ath_tasklet+0x24/0x34 [umac] 

是什麼ieee80211_scan_entry_update.clone.2意思?

課程源代碼僅包含ieee80211_scan_entry_update()函數。

gcc製作克隆函數的原因是什麼?

感謝

回答

4

在編譯器的情況下,function cloning創造了一些修改函數的多個副本。

例如,如果編譯器發現使用相同的初始參數調用了許多不同時間的函數,則可能會克隆該函數以生成一個少一個參數的版本,然後更改所有調用者以調用克隆。