SlideShare a Scribd company logo
1 of 15
Download to read offline
DTrace
dtrace.conf(12)
SVP, Engineering
bryan@joyent.com
Bryan Cantrill
@bcantrill
Welcome to dtrace.conf!
• ~80 participants, representing:
• ~35 companies, ~7 operating systems, ~3 language
runtimes, ~3 databases, ~2 networking infrastructure
companies, ~2 universities
• …and 1 industry analyst
• Twitter: #dtraceconf
• Thank you to our sponsors: Stone Cobra, DEY for
illumos, Nexenta, Basho and the Joyent Cloud
• Thanks to @substack for the T-shirt design
• Huge thank you to @deirdres for organizing dtrace.conf!
DTrace Version: 2005-2008
1
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2005 2006 2007 2008 2009 2010 2011
DTrace Version: 2005-2010
1
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2005 2006 2007 2008 2009 2010 2011
DTrace Version: 2005-present
1
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2005 2006 2007 2008 2009 2010 2011
DTrace in the past year
• Added a log-linear quantization action (llquantize())
• Added KVM support with vmregs[] variable
• Added the CTF-aware print action (ht: @ericschrock)
• A bunch of little stuff:
• Allowed tracemem() to take a variable-size
• Added toupper()/tolower()
• Allowed lltostr() to take an optional base
• A bunch of bug fixes:
• Fixed USDT in the non-global zone from the global zone
• Added USDT provider reaping (a long-time issue)
DTrace: Some open problems
• Implementing (finishing) dynamic translators
• Instrumenting hardware-virtualized guests from the host
• Support dynamic USDT providers
• Integrating with user-level CTF
• Supporting user-level postmortem DTrace
• Transparent instrumentation of multiple processes
• Unifying theme: better instrumentation up-stack
Dynamic translators
• DTrace uses translators to translate arguments from
their implementation to a stable (synthetic) structure
• These translators are all static — they are found (and
compiled) at compile time by libdtrace
• Implementation-specific .d files must therefore be
delivered into the DTrace library path
• If it must be said, this is a mess: different versions of
implementations canʼt co-exist
• Static translation also means that having DTrace privs in
the non-global zone is insufficient to get to useful
(translated) in-kernel structures
Dynamic translators, cont.
• For as long as we have had translators, we have talked
of making them dynamic
• Idea: translation definition lives in the binary (either the
application or the kernel), and the DIF use of the
translator is symbolic — DTrace figures it out at run-time
• Difficult in that it requires changes at many levels of the
DTrace stack (compiler, in-kernel, app build chain)
• Good news: some compiler work has already been done
(see use of DIF_OP_XLATE and DIF_OP_XLARG —
only generated when -xlate=dynamic!)
• Bad news: no in-kernel consumer (yet) — and the
compiler work is almost certainly incomplete...
Instrumenting VM guests
• DTrace is present on several OSs that also support first
class hardware virtualization (e.g., KVM)
• We have taken a first stab with the vmregs[] variable
and exit instrumentation — but there is much more to do
• The guest is just executing on host-accessible physical;
what guest cooperation do we need to be able to
instrument that?
• What would the mechanism for guest cooperation be?
• Can we meaningfully instrument guests without any
guest cooperation at all?
Supporting dynamic USDT providers
• Chris Andrews (@chrisandrews) developed a very
useful technique for defining providers in dynamic
languages: the provider DOF is generated dynamically
• Chris has done this for node (node-dtrace-provider),
Ruby (ruby-dtrace) and Perl (Devel::DTrace::Provider)
• This has proven itself in other software, e.g. Joyentʼs
Mark Cavage (@mcavage) has used this to great effect
in node-restify and ldap.js
• Is there something that we can or should do to further
generalize this technique or better support it?
• What is the overlap with dynamic translators?
Integrating with user-level CTF
• Currently, DTrace does not consume user-level CTF
• When $target is specified, it should in theory be possible
to consume these definitions in lieu of or in addition to
kernel CTF
• How to know the types of arguments to pid-provider
probes? (Could a first cut be made without this?)
• How should user-level types be scoped? (Double back-
tick as in symbols for helpers?)
• If done implicitly, should we take a swing at implicit
copyin() at the same time?
User-level postmortem support
• Postmortem support in DTrace — like anonymous
tracing (and speculative tracing!) — is one of those
features that you donʼt need until you need it…
• ...at which point it pretty much saves your butt
• Is there interest in bringing this to user-level?
• Would involve extending “bufpolicy=ring” when $target is
set and $target dumps core to write ring buffer to core
file in new section
• New section would be consumed via mdbʼs ::dtrace
Instrumenting multiple processes
• Currently, instrumenting multiple processes requires
either explicit enumeration of pid probes or USDT
• Might be useful to follow-on-fork with the pid provider
and/or specify multiple processes to instrument
• There are lots of weird corner cases (e.g., what does
$target evaluate to if used in a predicate?)
• We have used USDT to largely skirt this issue; have we
merely bought ourselves time, or does USDT largely
obviate the need for this?
On with dtrace.conf!

More Related Content

More from bcantrill

No Moore Left to Give: Enterprise Computing After Moore's Law
No Moore Left to Give: Enterprise Computing After Moore's LawNo Moore Left to Give: Enterprise Computing After Moore's Law
No Moore Left to Give: Enterprise Computing After Moore's Lawbcantrill
 
Andreessen's Corollary: Ethical Dilemmas in Software Engineering
Andreessen's Corollary: Ethical Dilemmas in Software EngineeringAndreessen's Corollary: Ethical Dilemmas in Software Engineering
Andreessen's Corollary: Ethical Dilemmas in Software Engineeringbcantrill
 
Visualizing Systems with Statemaps
Visualizing Systems with StatemapsVisualizing Systems with Statemaps
Visualizing Systems with Statemapsbcantrill
 
Platform values, Rust, and the implications for system software
Platform values, Rust, and the implications for system softwarePlatform values, Rust, and the implications for system software
Platform values, Rust, and the implications for system softwarebcantrill
 
Is it time to rewrite the operating system in Rust?
Is it time to rewrite the operating system in Rust?Is it time to rewrite the operating system in Rust?
Is it time to rewrite the operating system in Rust?bcantrill
 
dtrace.conf(16): DTrace state of the union
dtrace.conf(16): DTrace state of the uniondtrace.conf(16): DTrace state of the union
dtrace.conf(16): DTrace state of the unionbcantrill
 
The Hurricane's Butterfly: Debugging pathologically performing systems
The Hurricane's Butterfly: Debugging pathologically performing systemsThe Hurricane's Butterfly: Debugging pathologically performing systems
The Hurricane's Butterfly: Debugging pathologically performing systemsbcantrill
 
Papers We Love: ARC after dark
Papers We Love: ARC after darkPapers We Love: ARC after dark
Papers We Love: ARC after darkbcantrill
 
Principles of Technology Leadership
Principles of Technology LeadershipPrinciples of Technology Leadership
Principles of Technology Leadershipbcantrill
 
Zebras all the way down: The engineering challenges of the data path
Zebras all the way down: The engineering challenges of the data pathZebras all the way down: The engineering challenges of the data path
Zebras all the way down: The engineering challenges of the data pathbcantrill
 
Platform as reflection of values: Joyent, node.js, and beyond
Platform as reflection of values: Joyent, node.js, and beyondPlatform as reflection of values: Joyent, node.js, and beyond
Platform as reflection of values: Joyent, node.js, and beyondbcantrill
 
Debugging under fire: Keeping your head when systems have lost their mind
Debugging under fire: Keeping your head when systems have lost their mindDebugging under fire: Keeping your head when systems have lost their mind
Debugging under fire: Keeping your head when systems have lost their mindbcantrill
 
Down Memory Lane: Two Decades with the Slab Allocator
Down Memory Lane: Two Decades with the Slab AllocatorDown Memory Lane: Two Decades with the Slab Allocator
Down Memory Lane: Two Decades with the Slab Allocatorbcantrill
 
The State of Cloud 2016: The whirlwind of creative destruction
The State of Cloud 2016: The whirlwind of creative destructionThe State of Cloud 2016: The whirlwind of creative destruction
The State of Cloud 2016: The whirlwind of creative destructionbcantrill
 
Oral tradition in software engineering: Passing the craft across generations
Oral tradition in software engineering: Passing the craft across generationsOral tradition in software engineering: Passing the craft across generations
Oral tradition in software engineering: Passing the craft across generationsbcantrill
 
The Container Revolution: Reflections after the first decade
The Container Revolution: Reflections after the first decadeThe Container Revolution: Reflections after the first decade
The Container Revolution: Reflections after the first decadebcantrill
 
Debugging (Docker) containers in production
Debugging (Docker) containers in productionDebugging (Docker) containers in production
Debugging (Docker) containers in productionbcantrill
 
Papers We Love: Jails and Zones
Papers We Love: Jails and ZonesPapers We Love: Jails and Zones
Papers We Love: Jails and Zonesbcantrill
 
Why it’s (past) time to run containers on bare metal
Why it’s (past) time to run containers on bare metalWhy it’s (past) time to run containers on bare metal
Why it’s (past) time to run containers on bare metalbcantrill
 
Debugging microservices in production
Debugging microservices in productionDebugging microservices in production
Debugging microservices in productionbcantrill
 

More from bcantrill (20)

No Moore Left to Give: Enterprise Computing After Moore's Law
No Moore Left to Give: Enterprise Computing After Moore's LawNo Moore Left to Give: Enterprise Computing After Moore's Law
No Moore Left to Give: Enterprise Computing After Moore's Law
 
Andreessen's Corollary: Ethical Dilemmas in Software Engineering
Andreessen's Corollary: Ethical Dilemmas in Software EngineeringAndreessen's Corollary: Ethical Dilemmas in Software Engineering
Andreessen's Corollary: Ethical Dilemmas in Software Engineering
 
Visualizing Systems with Statemaps
Visualizing Systems with StatemapsVisualizing Systems with Statemaps
Visualizing Systems with Statemaps
 
Platform values, Rust, and the implications for system software
Platform values, Rust, and the implications for system softwarePlatform values, Rust, and the implications for system software
Platform values, Rust, and the implications for system software
 
Is it time to rewrite the operating system in Rust?
Is it time to rewrite the operating system in Rust?Is it time to rewrite the operating system in Rust?
Is it time to rewrite the operating system in Rust?
 
dtrace.conf(16): DTrace state of the union
dtrace.conf(16): DTrace state of the uniondtrace.conf(16): DTrace state of the union
dtrace.conf(16): DTrace state of the union
 
The Hurricane's Butterfly: Debugging pathologically performing systems
The Hurricane's Butterfly: Debugging pathologically performing systemsThe Hurricane's Butterfly: Debugging pathologically performing systems
The Hurricane's Butterfly: Debugging pathologically performing systems
 
Papers We Love: ARC after dark
Papers We Love: ARC after darkPapers We Love: ARC after dark
Papers We Love: ARC after dark
 
Principles of Technology Leadership
Principles of Technology LeadershipPrinciples of Technology Leadership
Principles of Technology Leadership
 
Zebras all the way down: The engineering challenges of the data path
Zebras all the way down: The engineering challenges of the data pathZebras all the way down: The engineering challenges of the data path
Zebras all the way down: The engineering challenges of the data path
 
Platform as reflection of values: Joyent, node.js, and beyond
Platform as reflection of values: Joyent, node.js, and beyondPlatform as reflection of values: Joyent, node.js, and beyond
Platform as reflection of values: Joyent, node.js, and beyond
 
Debugging under fire: Keeping your head when systems have lost their mind
Debugging under fire: Keeping your head when systems have lost their mindDebugging under fire: Keeping your head when systems have lost their mind
Debugging under fire: Keeping your head when systems have lost their mind
 
Down Memory Lane: Two Decades with the Slab Allocator
Down Memory Lane: Two Decades with the Slab AllocatorDown Memory Lane: Two Decades with the Slab Allocator
Down Memory Lane: Two Decades with the Slab Allocator
 
The State of Cloud 2016: The whirlwind of creative destruction
The State of Cloud 2016: The whirlwind of creative destructionThe State of Cloud 2016: The whirlwind of creative destruction
The State of Cloud 2016: The whirlwind of creative destruction
 
Oral tradition in software engineering: Passing the craft across generations
Oral tradition in software engineering: Passing the craft across generationsOral tradition in software engineering: Passing the craft across generations
Oral tradition in software engineering: Passing the craft across generations
 
The Container Revolution: Reflections after the first decade
The Container Revolution: Reflections after the first decadeThe Container Revolution: Reflections after the first decade
The Container Revolution: Reflections after the first decade
 
Debugging (Docker) containers in production
Debugging (Docker) containers in productionDebugging (Docker) containers in production
Debugging (Docker) containers in production
 
Papers We Love: Jails and Zones
Papers We Love: Jails and ZonesPapers We Love: Jails and Zones
Papers We Love: Jails and Zones
 
Why it’s (past) time to run containers on bare metal
Why it’s (past) time to run containers on bare metalWhy it’s (past) time to run containers on bare metal
Why it’s (past) time to run containers on bare metal
 
Debugging microservices in production
Debugging microservices in productionDebugging microservices in production
Debugging microservices in production
 

Recently uploaded

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 

Recently uploaded (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 

dtrace.conf(12): DTrace state of the union

  • 2. Welcome to dtrace.conf! • ~80 participants, representing: • ~35 companies, ~7 operating systems, ~3 language runtimes, ~3 databases, ~2 networking infrastructure companies, ~2 universities • …and 1 industry analyst • Twitter: #dtraceconf • Thank you to our sponsors: Stone Cobra, DEY for illumos, Nexenta, Basho and the Joyent Cloud • Thanks to @substack for the T-shirt design • Huge thank you to @deirdres for organizing dtrace.conf!
  • 6. DTrace in the past year • Added a log-linear quantization action (llquantize()) • Added KVM support with vmregs[] variable • Added the CTF-aware print action (ht: @ericschrock) • A bunch of little stuff: • Allowed tracemem() to take a variable-size • Added toupper()/tolower() • Allowed lltostr() to take an optional base • A bunch of bug fixes: • Fixed USDT in the non-global zone from the global zone • Added USDT provider reaping (a long-time issue)
  • 7. DTrace: Some open problems • Implementing (finishing) dynamic translators • Instrumenting hardware-virtualized guests from the host • Support dynamic USDT providers • Integrating with user-level CTF • Supporting user-level postmortem DTrace • Transparent instrumentation of multiple processes • Unifying theme: better instrumentation up-stack
  • 8. Dynamic translators • DTrace uses translators to translate arguments from their implementation to a stable (synthetic) structure • These translators are all static — they are found (and compiled) at compile time by libdtrace • Implementation-specific .d files must therefore be delivered into the DTrace library path • If it must be said, this is a mess: different versions of implementations canʼt co-exist • Static translation also means that having DTrace privs in the non-global zone is insufficient to get to useful (translated) in-kernel structures
  • 9. Dynamic translators, cont. • For as long as we have had translators, we have talked of making them dynamic • Idea: translation definition lives in the binary (either the application or the kernel), and the DIF use of the translator is symbolic — DTrace figures it out at run-time • Difficult in that it requires changes at many levels of the DTrace stack (compiler, in-kernel, app build chain) • Good news: some compiler work has already been done (see use of DIF_OP_XLATE and DIF_OP_XLARG — only generated when -xlate=dynamic!) • Bad news: no in-kernel consumer (yet) — and the compiler work is almost certainly incomplete...
  • 10. Instrumenting VM guests • DTrace is present on several OSs that also support first class hardware virtualization (e.g., KVM) • We have taken a first stab with the vmregs[] variable and exit instrumentation — but there is much more to do • The guest is just executing on host-accessible physical; what guest cooperation do we need to be able to instrument that? • What would the mechanism for guest cooperation be? • Can we meaningfully instrument guests without any guest cooperation at all?
  • 11. Supporting dynamic USDT providers • Chris Andrews (@chrisandrews) developed a very useful technique for defining providers in dynamic languages: the provider DOF is generated dynamically • Chris has done this for node (node-dtrace-provider), Ruby (ruby-dtrace) and Perl (Devel::DTrace::Provider) • This has proven itself in other software, e.g. Joyentʼs Mark Cavage (@mcavage) has used this to great effect in node-restify and ldap.js • Is there something that we can or should do to further generalize this technique or better support it? • What is the overlap with dynamic translators?
  • 12. Integrating with user-level CTF • Currently, DTrace does not consume user-level CTF • When $target is specified, it should in theory be possible to consume these definitions in lieu of or in addition to kernel CTF • How to know the types of arguments to pid-provider probes? (Could a first cut be made without this?) • How should user-level types be scoped? (Double back- tick as in symbols for helpers?) • If done implicitly, should we take a swing at implicit copyin() at the same time?
  • 13. User-level postmortem support • Postmortem support in DTrace — like anonymous tracing (and speculative tracing!) — is one of those features that you donʼt need until you need it… • ...at which point it pretty much saves your butt • Is there interest in bringing this to user-level? • Would involve extending “bufpolicy=ring” when $target is set and $target dumps core to write ring buffer to core file in new section • New section would be consumed via mdbʼs ::dtrace
  • 14. Instrumenting multiple processes • Currently, instrumenting multiple processes requires either explicit enumeration of pid probes or USDT • Might be useful to follow-on-fork with the pid provider and/or specify multiple processes to instrument • There are lots of weird corner cases (e.g., what does $target evaluate to if used in a predicate?) • We have used USDT to largely skirt this issue; have we merely bought ourselves time, or does USDT largely obviate the need for this?