LTO: ihe ọ bụ na otu esi eji ya na Gentoo

Kedu ihe bụ LTO?

LTO bu acronym maka Njikọ Oge Njikọ. Ọ bụ ọrụ nke onye nchịkọta na-egbu oge njikarịcha n'oge nke ijikọ faịlụ isi, na-enye gị ohere ịhụ faịlụ niile nke mejupụtara otu arụ ọrụ dị ka otu faịlụ, ma si otú a tinye njikarịcha na ụzọ dị irè karị.

Maka ozi ọzọ: wiki nke GCC.

Seehụ uru na ọghọm dị na LTO: Ihe akara ngosi nke Phoronix

Ihe kwesiri iburu n'uche

  • Ọ bụ ejighị n'aka, ọ nwere ike ibute nsogbu na ụfọdụ nchịkọta.
  • Packfọdụ nchịkọta agaghị ada mkpokọta (karịa otu esi edozi nke a ma emechaa).
  • A na-atụ aro ka ị jiri njikọ njikọ gold.
  • Na-eji mgbe niile ọhụrụ version nke GCC.

gold, na mgbakwunye na ịkwado njirimara dị elu nke na-eme ka ọ dị mma iji LTO, ọ dị ngwa ngwa karịa GNU ld, ọ kachasị n’ihe gbasara mmemme buru ibu, ebe ọ ga - abụ 5 ugboro ngwa ngwa. Iji jiri ya, gbaa ọsọ:

binutils-config --linker ld.gold


Iji LTO: usoro akwadoro

Kama ịgbalite LTO n'ụwa nile (nke nwere ike ịkpata nsogbu) ọ ka mma ịkwalite ya na nchịkọta anyị chọrọ. Wayzọ a, naanị na nchịkọta ị chọrọ irite uru na LTO a jikọtara ya na njikarịcha a, ma ọ bụ nke na-ezere oge nchịkọta dị nwayọ na mmemme ndị anaghị erite uru na ya. Enwere ike imezu ihe a:

Na ndekọ na / wdg / portage / env, anyị mepụtara faịlụ ahụ LTO.conf ma anyị tinye usoro ndị a:

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.

Yabụ, iji LTO na ngwugwu, naanị anyị ga-etinye aha ya (aha zuru ezu, www-client / firefox, kama nke Firefox) na faịlụ ahụ ngwugwu.env, tinyere LTO.conf n'aka nri gị. N'okpuru ebe a bụ ihe atụ:

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

Ugbu a, anyị ga-achịkọta nchịkọta anyị chọrọ ka ha jiri LTO.


Iji LTO ụwa (anaghị atụ aro ya)

Kama itinye LTO ngwugwu site na ngwugwu, anyị nwekwara ike itinye ya na ụwa (nke bụ ihe m na-eji). Iji tinye ya n'ọrụ, usoro ị ga - agbaso bụ:

Anyị na-edezi faịlụ /etc/portage/make.conf ma gbakwunye ihe ndị a (ha bụ otu ahịrị nke faịlụ ahụ 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.

N'aka nke ya, anyị mepụtara faịlụ /etc/portage/env/no-LTO.conf ma gbakwunye usoro ndị a:

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

Na na faịlụ ahụ ngwugwu.env anyị ga-etinye nchịkọta ndị nchịkọta ya na-adabaghị LTO. Ọ lee nkem ngwugwu.env (mara na m na-eji Nolto.conf kama nke mba-LTO.conf).

Anyi aghaghi itinye LTO ka eji agbanwe nke ime.conf, nke a dị mkpa n'ihi na ndị mmepe nke Gentoo ha na-(nwayọọ nwayọọ) na-agbakwunye nhọrọ patches maka ojiji nke a njikarịcha na ụfọdụ nchịkọta.

Ozugbo emere nke a, ka anyị gaa n'ihu weghachite usoro sistemụ niile:

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

Site na iji-na-aga, anyị na-agwa Ọdụ ụgbọ mmiri ileghara njehie anya, ma &> biagharia mputa nchita niile na faịlụ a na-akpọ njehie, jiri faịlị iji hụ ụdị ngwugwu na-achịkọta ma tinye ha na ndepụta nke ngwugwu.env.

The &> ga - anapụ anyị niile mmepụta, ma ọ bụrụ na anyị chọrọ ịhụ na mmepụta nke usoro, anyị ga-eji (dị ka mgbọrọgwụ) iwu a:

tail -f /var/log/emerge.log

Na nke ahụ niile, enwere m olileanya na ahapụbeghị m obi abụọ ọ bụla, ọ bụrụ na m ga-enwe obi ụtọ wee dee edemede banyere ya Meghe na / ma ọ bụ Graphite.


Ọdịnaya nke isiokwu agbaso ụkpụrụ anyị nke ụkpụrụ nduzi. Kpesa mmejọ pịa ebe a.

Ihe 3 kwuru, hapụ nke gị

Hapu okwu gi

Adreesị email gị agaghị bipụtara. Chọrọ ubi na-akara na *

*

*

  1. Rụ ọrụ maka data: Miguel Ángel Gatón
  2. Nzube nke data: Nchịkwa SPAM, njikwa okwu.
  3. Ikike: Nkwenye gị
  4. Nkwurịta okwu nke data: Agaghị agwa ndị ọzọ data ahụ ma ọ bụghị site na iwu.
  5. Nchekwa data: Ebe nchekwa data nke Occentus Networks (EU) kwadoro
  6. Ikike: Oge obula inwere ike igbachi, weghachite ma hichapụ ihe omuma gi.

  1.   msx dijo

    Gentoo, meh ...
    Ka anyị gaa ihe dị mkpa: Graphite!

    1.    Mmmmmmmmmmm dijo

      The nzuzu na ssensual Graphite xD, na subnormal ihe na-agbawa gị xD usoro, m na-echeta na oge ikpeazụ m na-eji ya, ọ bụ iji mee ka a maka na iterates 50 ugboro na-eme "gwa-eziga KDE <3" nke mere na iteration nọmba 50, gburugburu ebe obibi ga-adaba na hel hahahahaha, ee, ana m aga farts xD

    2.    okporo ụzọ dijo

      Ekwuola m na m ka gbara ume ma mee otu n'ime Graphite. Mana agbanyeghị, Graphite (yana njikarịcha ọ bụla) na - arụ ọrụ kacha mma na LTO. Ọzọkwa, n'adịghị ka LTO, Graphite na OpenMP nwere nsogbu. Ọ bụghị mmemme niile na-erite uru na ya, na ndị na-anaghị erite uru, arụmọrụ na-ebelata, yabụ na nke a ọ ka mma iji ya naanị maka ngwugwu ole na ole.