Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Programming RbBCC
Search
KONDO Uchio
July 17, 2020
Technology
0
580
Programming RbBCC
@ Ruby Association Activity Report
https://rubyassociation.doorkeeper.jp/events/107156
KONDO Uchio
July 17, 2020
Tweet
Share
More Decks by KONDO Uchio
See All by KONDO Uchio
大規模レガシーテストを 倒すための CI基盤の作り方 / #CICD2023
udzura
5
2.3k
Ruby x BPF in Action / RubyKaigi 2022
udzura
0
190
Narrative of Ruby & Rust
udzura
0
170
開発者生産性指標の可視化 / pepabo-four-keys
udzura
3
1.6k
Talk of RBS
udzura
0
390
Re: みなさん最近どうですか? / FGN tech meetup in 2021
udzura
0
700
Dockerとやわらかい仮想化 - ProSec-IT/SECKUN 2021 edition -
udzura
2
670
Device access filtering in cgroup v2
udzura
1
760
"Story of Rucy" on RubyKaigi takeout 2021
udzura
0
710
Other Decks in Technology
See All in Technology
ジョブマッチングサービスにおける相互推薦システムの応用事例と課題
hakubishin3
3
610
福岡新卒エンジニアの会
teba_eleven
1
180
隣接領域をBeyondするFinatextのエンジニア組織設計 / beyond-engineering-areas
stajima
1
110
ライブラリでしかお目にかかれない珍しい実装
mikanichinose
2
300
エンジニアが一生困らない ドキュメント作成の基本
naohiro_nakata
2
110
SREによる隣接領域への越境とその先の信頼性
shonansurvivors
1
230
透過型SMTPプロキシによる送信メールの可観測性向上: Update Edition / Improved observability of outgoing emails with transparent smtp proxy: Update edition
linyows
2
160
20241108_CS_LLMMT
shigashiyama
0
220
Microsoft MVPになる前、なってから/Fukuoka_Tech_Women_Community_1_baba
nina01
0
170
2024年グライダー曲技世界選手権参加報告/2024 WGAC report
jscseminar
0
160
組み込みLinuxの時系列
puhitaku
3
970
[FOSS4G 2024 Japan LT] LLMを使ってGISデータ解析を自動化したい!
nssv
1
150
Featured
See All Featured
Designing the Hi-DPI Web
ddemaree
280
34k
It's Worth the Effort
3n
183
27k
Unsuck your backbone
ammeep
668
57k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
The Pragmatic Product Professional
lauravandoore
31
6.3k
RailsConf 2023
tenderlove
29
890
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Practical Orchestrator
shlominoach
186
10k
Keith and Marios Guide to Fast Websites
keithpitt
409
22k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Transcript
-JOVYͷτϨʔγϯάٕज़Λ $3VCZ͔Βར༻͢Δڥͷඋ 6DIJP,POEP(.01FQBCP *OD !3VCZ"TTPDJBUJPO"DUJWJUZ3FQPSU 1SPHSBNNJOH3C#$$
େࣄͳ͓Βͤ
3C#$$ຊϦϦʔε 3C#$$ 3VCZͰಈ͖·ͤΜ pEEMF** charܕʹͳ͍ͬͯΔҾʹ ۭจࣈΛ͢ͱɺ0,ɺ4&(7
wۙ౻Ӊஐ࿕,POEP6DIJP w(.0ϖύϘٕज़ج൫νʔϜ wຊۀ%VPMJOHPͱ0WFSDPPLFE wझຯ-JOVYɺ$POUBJOFSTɺγεϓϩ w3VCZ,BJHJ
ΞδΣϯμ wF#1'ͱ3C#$$ͷհʢdNʣ wຊॿʹΑΔՌͷհʢdNʣ w؆୯ͳ3C#$$ͷϥΠϒίʔσΟϯάʢNdʣ w·ͱΊɺࠓޙʢdNʣ
F#1'ͷ
F#1'ͱ w#FSLFMFZ1BDLFU'JMUFS wຊདྷɺύέοτϑΟϧλͷͨΊͷΞϧΰϦζϜɾٕज़ͷ໊લ wʹ-JOVYʹҠ২͞ΕɺMJCQDBQͷதͳͲͰར༻ wঃʑʹTFDDPNQɺΧʔωϧΠϕϯττϨʔεʹར༻͞ΕΔ
Ͱ͖Δ͜ͱ wF#1'ɺಠࣗͷ໋ྩηοτΛ࣋ͭ7.ͱߟ͑ͯྑ͍ɻ wΧʔωϧͷதͰಈ͍ͯɺߴʹ༷ʑͳͷΛϑΟϧλϦϯά͢Δ wύέοτϑΟϧλʔʢUDQEVNQɺUDɺ9%1ʣ wγεςϜίʔϧͷϑΟϧλʔʢTFDDPNQʣ wΧʔωϧΠϕϯτͷϑΟϧλʔʢ#$$CQGUSBDFʣ wͦͷଞʢDHSPVQͷσόΠεΞΫηε੍ޚͰͬͨΓʣ
IUUQXXXCSFOEBOHSFHHDPNCMPHCQGQFSGPSNBODFUPPMTCPPLIUNM
#$$ͱʁ wF#1'ͷϓϩάϥϜΛಈ͔͢ʹɺCQG γεςϜίʔϧʹόΠτ ίʔυΛ͢ܗʹͳΔɻόΠτίʔυΛਓ͕ॻ͘ͷ͍͠ wͦ͜Ͱ#1'$PNQJMFS$PMMFDUJPO w$ϕʔεͷҰछͷ%4-ʴεΫϦϓτݴޠʢ1ZUIPOɺ-VBͷϥΠϒϥϦ ΛಉࠝʣͰF#1'ͷπʔϧΛॻ͘͜ͱ͕Ͱ͖Δ
طଘٕज़ͱͷҧ͍ wطଘͷτϨʔγϯάٕज़͕͍͔ͭ͋͘Δ wTUSBDF HECQUSBDF ϕʔεͷͷɺҰॠࢭΊͯݕࠪ͢ΔΞʔΩςΫνϟ ͳͷͰɺΦʔόʔϔου͕ແࢹͰ͖ͳ͍ϨϕϧʹͳΔ wQFSGجຊతʹूܭ͕ϢʔβϥϯυͳͷͰɺෛՙʹͳΔ͜ͱ͕͋Δ wTZUFNUBQ GUSBDFF#1'ͱಉͷιʔεΛ͍ΠϕϯτΛऔΔɻͨͩɺ
F#1'ͷ࣋ͭόϦσʔγϣϯʹΑΔ҆શੑɺΧʔωϧଆͰͷूܭʹΑΔߴੑ ͳͲϝϦοτ͔
ൺֱਤ 5PPMT 3FMBUFETZTDBMMT 4JEF&⒎FDU /PUF gdb strace ptrace(2) େ ରΛҰ࣌తʹࢭΊͯɺ
ใΛऔಘ͠࠶։͢Δ perf perf_event_open(2) தʙখ جຊతʹूܭ͔Βઌ Ϣʔβϥϯυ systemtap ftrace (kern module) (tracefs) தʙখ F#1'ΑΓݹΊͷΧʔωϧ Ͱར༻Մೳ bpftrace BCC bpf(2) perf_event_open(2) খ WBMJEBUPSɺ#1'NBQͳͲ ར༻ՄɺݴޠόΠϯσΟϯάଟ
طଘٕज़ͱͷҧ͍ wF#1'ΧʔωϧͰϓϩάϥϜΛಈ͔͢Έ wΧʔωϧͰϓϩάϥϜΛಈ͔͢ͱ͍͏ҙຯͰૉʹϞδϡʔϧΛॻ ͘͜ͱͰ͖Δ wΧʔωϧϞδϡʔϧવɺඇৗʹଟ͘ͷ͜ͱ͕Մೳ͕ͩɺόά ةݥͳίʔυ࣮ߦՄೳͰɺΧʔωϧύχοΫͷڪΕ͕͋Δ wF#1'ͷ࣮ߦػߏʹWFSJpFS͕ଘࡏ͠ɺةݥͳίʔυΛݕ͢Δ ʢFHແݶϧʔϓʣ
IUUQXXXCSFOEBOHSFHHDPNCMPHCQGBOFXUZQFPGTPGUXBSFIUNM
F#1'ࣗମͷઆ໌ࢿྉʢࢀߟʣ wIUUQTTQFBLFSEFDLDPNDIJLVXBJUMFBSOFCQG
Ϟνϕʔγϣϯ
#$$ͱʢ࠶ܝʣ wF#1'ͷϓϩάϥϜΛಈ͔͢ʹɺCQG γεςϜίʔϧʹόΠτ ίʔυΛ͢ܗʹͳΔɻόΠτίʔυΛਓ͕ॻ͘ͷ͍͠ wͦ͜Ͱ#1'$PNQJMFS$PMMFDUJPO w$ϕʔεͷҰछͷ%4-ʴεΫϦϓτݴޠʢ1ZUIPOɺ-VBͷϥΠϒϥϦ ΛಉࠝʣͰF#1'ͷπʔϧΛॻ͘͜ͱ͕Ͱ͖Δ
͑ͬ3VCZ
ॻ͔͘͠ͳ͍ ʢ͍ͭͰʹษڧ͠Α͏ʣ
F#1'Y3VCZͷϞνϕʔγϣϯ w3VCZΛಈ͔͢04ͱͯ͠ॏཁͳɺ-JOVYͷਐԽͷԸܙΛɺ3VCZ։ൃऀ ʢݴޠίΞ։ൃऀɺϢʔβ྆ํʣ͕ڗडͰ͖ΔΑ͏ʹ͍ͨ͠ w3C#$$Ͱɺ3VCZίΞ։ൃऀͷڞ௨ݴޠͰ͋Δ$ݴޠͱ3VCZͷ ͚ࣝͩͰෳࡶͳτϨʔγϯά͕Ͱ͖ΔΑ͏ʹͳΔ w%4-ͷΑ͏ͳΈͱΈ߹ΘͤΔ͜ͱͰɺτϨʔγϯάΛͬͱ &OKPZBCMFͳͷʹͰ͖ͳ͍͔
Ռ
ୡͨ͜͠ͱ w#$$ͷ1ZUIPO࣮Λ࣮༻ʹेͳػೳʹ͍ͭͯ3VCZʹҠ২ͨ͠ wαϯϓϧϓϩάϥϜɺԿΑΓνϡʔτϦΞϧΛ࡞ͨ͠ wຊޠ൛νϡʔτϦΞϧؚΉ w3C#$$Λར༻ͨ͠1P$Ϩϕϧͷ࣮ྫɾπʔϧΛ։ൃ
#$$3C#$$ w#$$ جຊతʹ MJCCDDͷ''*
#$$3C#$$ w3VCZඪ४ͷ pEEMFͰ 1ZUIPOͷ DUZQFTΛஔ
pEEMFͷར༻ w3C#$$3VCZͷඪ४ϥΠϒϥϦͷΈͰಈ࡞͢Δ ʢͪΖΜMJCCDDTP͕ೖ͍ͬͯΔલఏͰ͋Δɻϔομෆཁʣ
1ZUIPO൛ͷϦϑΝϨϯεʹ͋Δؔཏ
αϯϓϧ͍͔ͭ͘ɺνϡʔτϦΞϧ
ຊޠνϡʔτϦΞϧ
1ZUIPO൛ͱͷൺֱ wఏग़ͨ͠࠷ऴใࠂΛ͝ཡ͍ͩ͘͞
։ൃͨ͠πʔϧ#1'2- wCQGUSBDFͷ͋ͷݴޠͰͳ͘:".-3VCZͰτϨʔεͰ͖ΔίϚϯυ CQGUSBDF #1'2-3VCZ%4-
ಈը
։ൃͨ͠πʔϧ3BDL' w64%5ʢޙड़ʣΛར༻͠ɺ3BDL.JEEMFXBSFʹ1SPCFΛࠐΈܭଌ ूܭ͢Δαϯϓϧ
3BDL'ͷಈ࡞ݪཧ w੍ݶεϨουʹϦΫΤετͱ͍͏લఏ͕͋Δ
ಈը
3C#$$ͷ ར༻ʹ͋ͨͬͯ
ϙΠϯτ͍͔ͭ͘ wΠϕϯτιʔεͰओཁͳͷͭ͋Δɺ͓ͬͯ͘ wLQSPCFɺUSBDFQPJOUɺVQSPCFɺ64%5 wΠϯετʔϧखॱͳͲ(FUUJOH4UBSUFEͰ6CVOUVָ͕ wMJCCDDͷόʔδϣϯɹਪ0, wιϑτΣΞͷੑ্࣭ɺ୯७ʹ%PDLFSԽͮ͠Β͍ w݁ہΓ͍ͨͷϗετ͕Ͳ͏ͳͬͯΔ͔ͩͬͨΓ͢ΔΜͰ
LQSPCFLSFUQSPCF wΧʔωϧ෦ͷؔΛѻ͏QSPCFɻ wόʔδϣϯͰΠϯλϑΣʔε͕มΘΔ͔͠Εͳ͍ɻ wLQSPCF͕ؔΤϯλʔ࣌ɺLSFUQSPCF͕Ϧλʔϯ࣌ wͲͷΑ͏ͳLQSPCF͕ԿʹΘΕ͍ͯΔ͔αϯϓϧͰษڧ
USBDFQPJOU w3VCZͷ5SBDF1PJOUͱҧ͏֓೦Ͱɺ-JOVYͷQSPCFͷ͜ͱ wΧʔωϧʹ੩తʹΈࠐ·Εɺ໊લҾجຊతʹมΘΒͳ͍ wυΩϡϝϯτ͕ίϝϯτʹ͋Δ߹͋Δ wαϯϓϧͰͷΘΕํΛݟΔ΄͏͕ૣ͍͜ͱ͕ଟ͍ wྫ wTZTDBMMTTZT@FOUFS@ cTZT@FYJU@ γεςϜίʔϧͷ͍͔͚ wSBOEPNVSBOEPN@SFBEVSBOEPNͷಡΈऔΓ
wTDIFETDIFE@QSPDFTT@FYJUϓϩηεͷऴྃͳͲ
VQSPCFVSFUQSPCF wϢʔβϓϩάϥϜͷؔͳͲʹϑοΫͨ͠ΠϕϯτΛɺΧʔωϧͰ ͍͔͚ΒΕΔػೳɻ wجຊతʹFYQPSU͞ΕͯΔγϯϘϧΛQSPCF͢Δ wͪ͜ΒVQSPCF͕ΤϯλʔɺVSFUQSPCF͕Ϧλʔϯ
64%5 wϢʔβϓϩάϥϜͷҙͷՕॴʹQSPCFΛຒΊࠐΉػೳɻ wͲ͜ʹຒΊࠐ·Ε͍ͯΔ͔&-'ϔομͰ֬ೝͰ͖Δɻ wτϨʔε༗ޮ࣌ʹॳΊͯτϨʔε໋ྩ͕ಈ࡞͠ɺීஈOPQ໋ྩʹ ͳ͍ͬͯΔɻ͕ͨͬͯ͠ແޮ࣌Φʔόϔου͕ͳ͍ɻ
3VCZͷ64%5 w--enable-dtraceΦϓγϣϯΛ༗ޮʹͯ͠Ϗϧυ͢Ε༗ޮʹ wSCFOWͳΒɺ36#:@$0/'*(63&@0154ڥมͰࢦఆ wԿ͕ຒ·͍ͬͯΔ͔%5SBDFଆͷυΩϡϝϯτΛࢀর wTFFʮ3VCZͷ%5SBDFͷհʯ w IUUQTNBHB[JOFSVCZJTUOFUBSUJDMFT4QFDJBMEUSBDFIUNM w 8JLJIUUQTCVHTSVCZMBOHPSHQSPKFDUTSVCZXJLJ%5SBDF1SPCFT
3VCZͷ64%5
ϥΠϒͰͷ πʔϧ࡞σϞ
Ͳ͏ʂ VE[VSBͰ͢
ࠓޙͷల ʢ͕࣌ؒ͋Εʣ
3FE%BUB5PPMT࿈ܞ w۩ମతʹɺ$IBSUZͷσʔλߏʹɺ3C#$$ʹ͓͚Δ#1'NBQΛ දݱͨ͠ΫϥεΛରԠ͍ͤͨ͞ w$IBSUZ5BCMF"EBQUFST#$$తͳΞμϓλΛ࣮͢ΔͱΑ͍ w$IBSUZͷࢿ࢈Λͦͷ··ͬͯʢFHVOJDPEF@QMPUSCʣ τϨʔε݁ՌͷՄࢹԽ͕Ͱ͖Δ
ωοτϫʔΫτϨʔεपล wຊՈͷFYBNQMFTOFUXPSLJOHԼʹ͋ΔΑ͏ͳαϯϓϧͷҠ২ wগ͚ͩ͠։͍࢝ͯ͠Δ w9%1ྲྀߦͬͯΔͷͰ wطͷQZSPVUF૬ͷHFN͕3VCZʹͳ͍ͷͰɺҰ෦ͷαϯ ϓϧ؆୯ͳҠ২ͱ͍͏Θ͚ʹ͍͔ͣ·͍͠ɻ wOFUMJOLTPDLFUͱ͓͠ΌΓ͢ΔHFN͕ཉ͍͠ɻ
ͬͱকདྷVQTUSFBNͷߩݙ wকདྷJPWJTPSϓϩδΣΫτʹدଃ͠ɺ #$$։ൃίΞͱาௐΛ߹ΘͤΔͳͲ͍ͨ͠ wͦͷલʹ࣭Λ্͍͛ͨʢݴ͍༁ʣ wͲ͏͍͏खଓ͖ΛͱΕ͍͍ͷͩΖ͏ʁ w͜ͷࢿྉΛݟͨํͰॿݴ͕͋Εͱࢥ͍·͢
ँࣙ
ँࣙ wϝϯλʔͷాߞҰ͞Μ w͘͞ΒΠϯλʔωοτͷদຊ྄հ͞Μɺभେֶใج൫ݚڀ։ൃ ηϯλʔͷౢ٢ོઌੜɺּݪٛߊઌੜ wಛʹɺ#1'2-ౢ٢ઌੜͷΞυόΠεΛԼෑ͖ʹ͍ͯ͠·͢
&OKPZ 5SBDJOH