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
600
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
210
Narrative of Ruby & Rust
udzura
0
180
開発者生産性指標の可視化 / pepabo-four-keys
udzura
3
1.6k
Talk of RBS
udzura
0
400
Re: みなさん最近どうですか? / FGN tech meetup in 2021
udzura
0
720
Dockerとやわらかい仮想化 - ProSec-IT/SECKUN 2021 edition -
udzura
2
690
Device access filtering in cgroup v2
udzura
1
800
"Story of Rucy" on RubyKaigi takeout 2021
udzura
0
750
Other Decks in Technology
See All in Technology
Evolving Architecture
rainerhahnekamp
3
220
Fearsome File Formats
ange
0
550
AWSの生成AIサービス Amazon Bedrock入門!(2025年1月版)
minorun365
PRO
7
370
Azureの開発で辛いところ
re3turn
0
200
エンジニアリングマネージャー視点での、自律的なスケーリングを実現するFASTという選択肢 / RSGT2025
yoshikiiida
4
2.8k
株式会社ログラス − エンジニア向け会社説明資料 / Loglass Comapany Deck for Engineer
loglass2019
3
33k
#TRG24 / David Cuartielles / Post Open Source
tarugoconf
0
420
いまからでも遅くないコンテナ座学
nomu
0
200
3年でバックエンドエンジニアが5倍に増えても破綻しなかったアーキテクチャ そして、これから / Software architecture that scales even with a 5x increase in backend engineers in 3 years
euglena1215
11
4.3k
知っててうれしい HTTP Cookie を使ったセッション管理について
greendrop
1
110
[JAWS-UG新潟#20] re:Invent2024 -CloudOperationsアップデートについて-
shintaro_fukatsu
0
150
デジタルアイデンティティ技術 認可・ID連携・認証 応用 / 20250114-OIDF-J-EduWG-TechSWG
oidfj
2
220
Featured
See All Featured
RailsConf 2023
tenderlove
29
960
Designing Dashboards & Data Visualisations in Web Apps
destraynor
230
52k
Being A Developer After 40
akosma
89
590k
Thoughts on Productivity
jonyablonski
68
4.4k
We Have a Design System, Now What?
morganepeng
51
7.3k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
230
No one is an island. Learnings from fostering a developers community.
thoeni
19
3.1k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
29
2k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Navigating Team Friction
lara
183
15k
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