I-LTO: iyini nokuthi ungayisebenzisa kanjani kwi-Gentoo

Yini i-LTO?

LTO is the acronym for Ukuxhumanisa Isikhathi Sokuxhumanisa. Kungumsebenzi lapho umhlanganisi ebambezela ukulungiselelwa okwamanje kokuxhumanisa amafayela womthombo, akuvumela ukuthi ubone wonke amafayela akha okukodwa okuphathekayo njengefayela elilodwa, futhi ngale ndlela usebenzise ukwenziwa ngendlela ephumelela kakhulu.

Ngeminye imininingwane: iwiki ye- I-GCC.

Ukubona izinzuzo nezithiyo ze LTO: Amabhentshimakhi we Phoronix

Izinto okufanele uzigcine engqondweni

  • Ayizinzile, ingadala izinkinga kwamanye amaphakheji.
  • Amanye amaphakheji azohluleka ukuhlanganisa (okuningi ngokuthi ungakulungisa kanjani lokhu kamuva).
  • Kunconywa ukusebenzisa i-linker Gold.
  • Usa Siempre inguqulo yakamuva ye I-GCC.

Gold, ngaphezu kokusekela izici ezithuthukisiwe ezikwenza kube okuheha kakhulu ukusebenzisa LTO, iyashesha ukwedlula I-GNU ldikakhulukazi uma kukhulunywa ngezinhlelo ezinkulu, lapho ezingaba khona Izikhathi eziyi-5 ngokushesha. Ukuyisebenzisa, sebenzisa:

binutils-config --linker ld.gold


Kusetshenziswa i-LTO: indlela enconyiwe

Esikhundleni sokwenza kusebenze LTO emhlabeni jikelele (okungadala izinkinga) kungcono ukukusebenzisa kumaphakeji esiwafunayo. Ngale ndlela, amaphakheji kuphela ofuna ukuzuza kuwo LTO ahlanganiswa nalokhu kusebenza, noma okugwema izikhathi ezihamba kancane zokuhlanganiswa ezinhlelweni ezingazuzi kukho. Lokhu kungafinyelelwa ngale ndlela elandelayo:

Kumkhombandlela we- / etc / portage / env, Sakha ifayili I-LTO.conf futhi sengeza imigqa elandelayo:

CFLAGS="${CFLAGS} -flto=5" #pon en -flto los hilos  de tu CPU + 1
CXXFLAGS="${CXXFLAGS} -flto=5" #igual que arriba
LDFLAGS="${LDFLAGS} -fuse-linker-plugin" #solo si usas Gold, es mejor.

Ngakho-ke, ukusebenzisa LTO kwiphakeji, kufanele sibeke igama layo kuphela (igama eligcwele, www-client / firefox, Esikhundleni sefirefox) kufayela iphakethe.env, Nge I-LTO.conf ngakwesokudla sakho. Ngezansi isibonelo:

app-emulation/wine LTO.conf
www-client/firefox LTO.conf
sys-devel/gcc LTO.conf
kde-base/kdelibs LTO.conf

Manje kufanele sihlanganise amaphakheji esifuna ukuthi bawasebenzise LTO.


Kusetshenziswa i-LTO emhlabeni jikelele (akunconyiwe)

Esikhundleni sokufaka isicelo LTO package by package, futhi singayisebenzisa emhlabeni jikelele (okuyinto engiyisebenzisayo). Ukuyisebenzisa, izinyathelo okufanele zilandelwe yilezi:

Sihlela ifayili /etc/portage/make.conf bese sengeza okulandelayo (yimigqa efanayo yefayela I-LTO.conf):

CFLAGS="${CFLAGS} -flto=5" #pon en -flto los hilos  de tu CPU + 1
CXXFLAGS="${CXXFLAGS} -flto=5" #igual que arriba
LDFLAGS="${LDFLAGS} -fuse-linker-plugin" #solo si usas Gold, es mejor.

Ngokulandelayo, sakha ifayela /etc/portage/env/no-LTO.conf bese sengeza imigqa elandelayo:

CFLAGS="${CFLAGS} -fno-lto -fno-use-linker-plugin"
CXXFLAGS="${CXXFLAGS} -fno-lto -fno-use-linker-plugin"
LDFLAGS="${LDFLAGS} -fno-lto -fno-use-linker-plugin"

Futhi kufayela iphakethe.env sizobeka amaphakheji okuhlanganiswa kwawo kwehluleke nge- LTO. Yena lapha wami iphakethe.env (qaphela ukuthi ngisebenzisa nolto.conf esikhundleni akukho-LTO.conf).

Kumele futhi sengeze LTO UKUSEBENZISA ukuguquguquka kwe- yenza.conf, lokhu kuyadingeka ngoba onjiniyela be I-Gentoo zing (kancane) zengeza iziqeshana zokuzikhethela zokusetshenziswa kwalokhu kusebenza kwamanye amaphakheji.

Lapho lokhu sekwenziwe, ake siqhubeke nokuhlanganisa wonke amaphakheji wesistimu:

emerge -e @world @system --keep-going &> errores

Ngokusebenzisa ukuhamba, siyatshela I-Portage ukungazinaki amaphutha, ngenkathi &> qondisa kabusha ukukhishwa kwazo zonke izimbungulu kufayela elibizwa ngamaphutha, sebenzisa leli fayela ukubona ukuthi yimaphi amaphakheji ahlulekayo ukuwahlanganisa futhi uwafake ohlwini iphakethe.env.

I- &> izosiphuca konke okuphumayo, uma sifuna ukubona umphumela wenqubo, kufanele sisebenzise (njengezimpande) lo myalo:

tail -f /var/log/emerge.log

Futhi yilokho kuphela, ngiyethemba angizange ngishiye ukungabaza, uma lokho ngizojabula futhi ngibhale i-athikili ngakho I-OpenMP futhi / noma I-Graphite.


Okuqukethwe yi-athikili kunamathela ezimisweni zethu ze izimiso zokuhlelela. Ukubika iphutha chofoza lapha.

Amazwana ayi-3, shiya okwakho

Shiya umbono wakho

Ikheli lakho le ngeke ishicilelwe.

*

*

  1. Ubhekele imininingwane: Miguel Ángel Gatón
  2. Inhloso yedatha: Lawula Ugaxekile, ukuphathwa kwamazwana.
  3. Ukusemthethweni: Imvume yakho
  4. Ukuxhumana kwemininingwane: Imininingwane ngeke idluliselwe kubantu besithathu ngaphandle kwesibopho esisemthethweni.
  5. Isitoreji sedatha: Idatabase ebanjwe yi-Occentus Networks (EU)
  6. Amalungelo: Nganoma yisiphi isikhathi ungakhawulela, uthole futhi ususe imininingwane yakho.

  1.   msx kusho

    Gentoo, meh ...
    Ake siye entweni ebalulekile: Graphite!

    1.    yezimg kusho

      I-Graphite xD eyisiphukuphuku ne-ssensual, leyo nto engajwayelekile eqhuma uhlelo lwakho lwe-xD, ngiyakhumbula ukuthi okokugcina ngiyisebenzise, ​​kwakwanele ukwenza lokho kuphindwe izikhathi ezingama-50 ukwenza "ukwazisa-ukuthumela i-KDE <3" ukuze ku-iteration inombolo 50, imvelo izoqhuma iye esihogweni hahahahaha, yebo, bengiya ku-re-farts xD

    2.    umgwaqo kusho

      Ngivele ngasho ukuthi ngisakhuthazeka futhi ngenza omunye weGrafite. Kepha, noma kunjalo, i-Graphite (nokunye ukwenziwa okuhle) isebenza kangcono nge-LTO. Futhi, ngokungafani ne-LTO, i-Graphite ne-OpenMP inenkinga. Akuzona zonke izinhlelo ezisizakalayo, futhi kulezo ezingazuzi, ukusebenza kuyehla, ngakho kulokhu kungcono ukuyisebenzisa kuphela amaphakheji ambalwa.

i-bool(iqiniso)