SlideShare a Scribd company logo
1 of 19
Processor Trace 
WHAT ARE RECORDED? 
Pipat Methavanitpong 
+PipatMethavanitpong 
@fulcronz27
Foreword 
 This work is done solely by myself without support from Intel 
 Information in this document is derived from 
 IA64 System Programming Manual – Chapter 36 
 Some are from my understanding 
 Mistakes or wrong information may appear 
 I am willing to update and correct errata 
 Please contact me via Google Hangout 
 I am not responsible for damage using this document
Objective 
 Give summary of data generated from Intel PT 
 Include relationships between data types partially 
 Not include its mechanism and controlling
PT Overview 
 Machine instruction-level tracing 
 Use dedicated hardware to trace 
 Convention uses software to trace software 
 Bird eye view observation 
 Can fully reconstruct execution at Analyze time 
 Record events that cannot be refer solely from binary 
 Usage 
 Low-level debugging 
 Fine tuning performance 
 State recovery
Background 
 At the lowest level programs are chunks of machine instructions 
 Processor executes machine instructions in sequential fashion 
 Processor does not execute in sequence when 
 Executing a redirecting machine instruction 
 Handling an interrupt or an exception (asynchronous event) 
 … 
 Execution context may be changed 
 Changing execution mode 
 Page switching 
 …
Pros and Cons 
Pros 
 Finest grain in software tracing 
 Machine instruction level 
Cons 
 Design overhead 
 Additional hardware 
 Man-picked dynamic events 
 May miss some categories 
 Hard to change 
 Hardware implementation 
*My own opinion
Packet Types 
1. Packet Stream Boundary – Interval beats, Sync point for analyzer 
2. Taken Not-Taken – Conditional branch decision 
3. Target IP – Target address within program binary 
4. Flow Update Packets – Target address outside program binary (async events) 
5. Paging Information Packet – Modification to CR3 task page base address 
6. Time-Stamp Counter – Wall clock data 
7. MODE – Execution mode 
8. Core Bus Ratio – Bus clock ratio 
9. Overflow – Internal buffer overflow 
10. PAD – Alignment purpose
Packet Summary 
PIP MODE CBR 
Execution 
PSB OVF 
Processor Trace Packets 
TNT TIP 
Inside traced program 
Redirection 
FUP 
Outside 
traced 
program 
Environment 
Trace 
Alignment 
Misc 
PAD 
TSC 
Time 
*does not imply packet combination
Taken Not-Taken (TNT) 
 A group of binary decisions 
 2 types of event 
 Conditional branch 
 Taken(1) / Not taken(0) 
 Unmodified return address 
 Taken(1) 
 2 sizes 
 Short TNT – 8-bit packet contains 6 decision bits 
 Long TNT – 64-bit packet contains 47 decision bits 
 No need to fill all the bits 
 Partial TNT when generates other packets in the middle 
Decision 
Taken (1) Not Taken (0)
Target IP (TIP) 
 A destination address within traced program 
 Used for 
 Indirect jump / call – use an address from a register or memory 
 Modified return address – return address on a call stack is modified 
 Has different packet signature from FUP 
 Has 2 extra variants 
 TIP.PGE – Packet Generation Enable 
 TIP.PGD – Packet Generation Disable
Flow Update Packet (FUP) 
 A destination address outside a traced program 
 Generated when asynchronous event happens 
 External interrupts 
 Exceptions and faults 
 X instructions 
 #SMI 
 WRMSR that clears TraceEn (one of flags that control tracing operation) 
 Generated in combination with other packets (not talked here) 
 Has different packet signature from TIP
Page Information Packet (PIP) 
 Keep track of page information 
 Current linear address range 
 CR3 register contains task’s page base address 
 Generated when CR3 is modified 
 Has exceptional cases
MODE packet 
 Record of processor modes that affect 
 Execution behavior 
 Analyze operation 
 2 modes are recorded 
 Execution modes 
 16- / 32- / 64-bit 
 TSX transaction operations 
 Begin / commit / abort 
 Either HLE or RTM
Core Bus Ratio (CBR) Packet 
 Tells current core:bus ratio 
 Cannot tell CBR change starts affecting which IP 
 Generated when 
 CBR changes 
 As a part of PSB+
Packet Stream Boundary (PSB) 
 Generated every 4k traces 
 Like heartbeats for trace operation 
 Analyzer searches for this packet first to start decoding 
 PSB itself does not contains any information 
 Just pure binary signature 
 Generated in combination with other packets 
 A whole pack is called PSB+ 
 Tells current execution environment
Overflow (OVF) Packet 
 Generated when 
 PT happens to overflow its internal buffer 
 Analyzer skips to next FUP or TIP.PGE
PAD 
 Simply padding 
 No information contained 
 Improve packet-alignment 
 Or some implementation reasons
Time-Stamp Counter (TSC) 
 Give wall clock time 
 Included in PSB+ 
 Precedes CBR packet
THE END

More Related Content

What's hot

COSCUP 2020 RISC-V 32 bit linux highmem porting
COSCUP 2020 RISC-V 32 bit linux highmem portingCOSCUP 2020 RISC-V 32 bit linux highmem porting
COSCUP 2020 RISC-V 32 bit linux highmem portingEric Lin
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernelguest547d74
 
Page cache in Linux kernel
Page cache in Linux kernelPage cache in Linux kernel
Page cache in Linux kernelAdrian Huang
 
Stop the Guessing: Performance Methodologies for Production Systems
Stop the Guessing: Performance Methodologies for Production SystemsStop the Guessing: Performance Methodologies for Production Systems
Stop the Guessing: Performance Methodologies for Production SystemsBrendan Gregg
 
Linux Kernel - Virtual File System
Linux Kernel - Virtual File SystemLinux Kernel - Virtual File System
Linux Kernel - Virtual File SystemAdrian Huang
 
Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic ControlSUSE Labs Taipei
 
Performance Wins with eBPF: Getting Started (2021)
Performance Wins with eBPF: Getting Started (2021)Performance Wins with eBPF: Getting Started (2021)
Performance Wins with eBPF: Getting Started (2021)Brendan Gregg
 
BPF - in-kernel virtual machine
BPF - in-kernel virtual machineBPF - in-kernel virtual machine
BPF - in-kernel virtual machineAlexei Starovoitov
 
Understanding of linux kernel memory model
Understanding of linux kernel memory modelUnderstanding of linux kernel memory model
Understanding of linux kernel memory modelSeongJae Park
 
Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how Chirag Jog
 
Extreme Linux Performance Monitoring and Tuning
Extreme Linux Performance Monitoring and TuningExtreme Linux Performance Monitoring and Tuning
Extreme Linux Performance Monitoring and TuningMilind Koyande
 
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...ScyllaDB
 
Transparent Hugepages in RHEL 6
Transparent Hugepages in RHEL 6 Transparent Hugepages in RHEL 6
Transparent Hugepages in RHEL 6 Raghu Udiyar
 
DMA Survival Guide
DMA Survival GuideDMA Survival Guide
DMA Survival GuideKernel TLV
 
Introduction to ARM big.LITTLE technology
Introduction to ARM big.LITTLE technologyIntroduction to ARM big.LITTLE technology
Introduction to ARM big.LITTLE technology義洋 顏
 

What's hot (20)

COSCUP 2020 RISC-V 32 bit linux highmem porting
COSCUP 2020 RISC-V 32 bit linux highmem portingCOSCUP 2020 RISC-V 32 bit linux highmem porting
COSCUP 2020 RISC-V 32 bit linux highmem porting
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernel
 
Page cache in Linux kernel
Page cache in Linux kernelPage cache in Linux kernel
Page cache in Linux kernel
 
Stop the Guessing: Performance Methodologies for Production Systems
Stop the Guessing: Performance Methodologies for Production SystemsStop the Guessing: Performance Methodologies for Production Systems
Stop the Guessing: Performance Methodologies for Production Systems
 
Linux-Internals-and-Networking
Linux-Internals-and-NetworkingLinux-Internals-and-Networking
Linux-Internals-and-Networking
 
Architecture Of The Linux Kernel
Architecture Of The Linux KernelArchitecture Of The Linux Kernel
Architecture Of The Linux Kernel
 
Linux Kernel - Virtual File System
Linux Kernel - Virtual File SystemLinux Kernel - Virtual File System
Linux Kernel - Virtual File System
 
Linux Linux Traffic Control
Linux Linux Traffic ControlLinux Linux Traffic Control
Linux Linux Traffic Control
 
Performance Wins with eBPF: Getting Started (2021)
Performance Wins with eBPF: Getting Started (2021)Performance Wins with eBPF: Getting Started (2021)
Performance Wins with eBPF: Getting Started (2021)
 
BPF - in-kernel virtual machine
BPF - in-kernel virtual machineBPF - in-kernel virtual machine
BPF - in-kernel virtual machine
 
Linux kernel
Linux kernelLinux kernel
Linux kernel
 
Understanding of linux kernel memory model
Understanding of linux kernel memory modelUnderstanding of linux kernel memory model
Understanding of linux kernel memory model
 
Linux Internals - Part II
Linux Internals - Part IILinux Internals - Part II
Linux Internals - Part II
 
Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how Testing real-time Linux. What to test and how
Testing real-time Linux. What to test and how
 
4. linux file systems
4. linux file systems4. linux file systems
4. linux file systems
 
Extreme Linux Performance Monitoring and Tuning
Extreme Linux Performance Monitoring and TuningExtreme Linux Performance Monitoring and Tuning
Extreme Linux Performance Monitoring and Tuning
 
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
Database Performance at Scale Masterclass: Database Internals by Pavel Emelya...
 
Transparent Hugepages in RHEL 6
Transparent Hugepages in RHEL 6 Transparent Hugepages in RHEL 6
Transparent Hugepages in RHEL 6
 
DMA Survival Guide
DMA Survival GuideDMA Survival Guide
DMA Survival Guide
 
Introduction to ARM big.LITTLE technology
Introduction to ARM big.LITTLE technologyIntroduction to ARM big.LITTLE technology
Introduction to ARM big.LITTLE technology
 

Viewers also liked

RapidFire - the Easy Route to low Latency Cloud Gaming Solutions - AMD at GDC14
RapidFire - the Easy Route to low Latency Cloud Gaming Solutions - AMD at GDC14RapidFire - the Easy Route to low Latency Cloud Gaming Solutions - AMD at GDC14
RapidFire - the Easy Route to low Latency Cloud Gaming Solutions - AMD at GDC14AMD Developer Central
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at NetflixBrendan Gregg
 
Intel Processor History
Intel Processor HistoryIntel Processor History
Intel Processor Historynglkumar
 
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...CODE BLUE
 
01 intel processor architecture core
01 intel processor architecture core01 intel processor architecture core
01 intel processor architecture coresssuhas
 
Intel core i7 processor
Intel core i7 processorIntel core i7 processor
Intel core i7 processorGautam Kumar
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsBrendan Gregg
 
Linux Systems Performance 2016
Linux Systems Performance 2016Linux Systems Performance 2016
Linux Systems Performance 2016Brendan Gregg
 
Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016Brendan Gregg
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and moreBrendan Gregg
 
Velocity 2015 linux perf tools
Velocity 2015 linux perf toolsVelocity 2015 linux perf tools
Velocity 2015 linux perf toolsBrendan Gregg
 

Viewers also liked (12)

Principles in software debugging
Principles in software debuggingPrinciples in software debugging
Principles in software debugging
 
RapidFire - the Easy Route to low Latency Cloud Gaming Solutions - AMD at GDC14
RapidFire - the Easy Route to low Latency Cloud Gaming Solutions - AMD at GDC14RapidFire - the Easy Route to low Latency Cloud Gaming Solutions - AMD at GDC14
RapidFire - the Easy Route to low Latency Cloud Gaming Solutions - AMD at GDC14
 
Linux Profiling at Netflix
Linux Profiling at NetflixLinux Profiling at Netflix
Linux Profiling at Netflix
 
Intel Processor History
Intel Processor HistoryIntel Processor History
Intel Processor History
 
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
[CB16] COFI break – Breaking exploits with Processor trace and Practical cont...
 
01 intel processor architecture core
01 intel processor architecture core01 intel processor architecture core
01 intel processor architecture core
 
Intel core i7 processor
Intel core i7 processorIntel core i7 processor
Intel core i7 processor
 
Linux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old SecretsLinux Performance Analysis: New Tools and Old Secrets
Linux Performance Analysis: New Tools and Old Secrets
 
Linux Systems Performance 2016
Linux Systems Performance 2016Linux Systems Performance 2016
Linux Systems Performance 2016
 
Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016Broken Linux Performance Tools 2016
Broken Linux Performance Tools 2016
 
BPF: Tracing and more
BPF: Tracing and moreBPF: Tracing and more
BPF: Tracing and more
 
Velocity 2015 linux perf tools
Velocity 2015 linux perf toolsVelocity 2015 linux perf tools
Velocity 2015 linux perf tools
 

Similar to Intel processor trace - What are Recorded?

Control Unit (CU) – Part 2
Control Unit (CU) – Part 2Control Unit (CU) – Part 2
Control Unit (CU) – Part 2Ajeng Savitri
 
OSLec 4& 5(Processesinoperatingsystem).ppt
OSLec 4& 5(Processesinoperatingsystem).pptOSLec 4& 5(Processesinoperatingsystem).ppt
OSLec 4& 5(Processesinoperatingsystem).pptssusere16bd9
 
Operating System 3
Operating System 3Operating System 3
Operating System 3tech2click
 
Computer function-and-interconnection 3
Computer function-and-interconnection 3Computer function-and-interconnection 3
Computer function-and-interconnection 3Mujaheed Sulantingan
 
Computer function-and-interconnection 3
Computer function-and-interconnection 3Computer function-and-interconnection 3
Computer function-and-interconnection 3Mujaheed Sulantingan
 
03. top level view of computer function & interconnection
03. top level view of computer function & interconnection03. top level view of computer function & interconnection
03. top level view of computer function & interconnectionnoman yasin
 
Chapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and InterconectionChapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and InterconectionCésar de Souza
 
Ch14.run time support systems
Ch14.run time support systemsCh14.run time support systems
Ch14.run time support systemsYi-Jun Zheng
 
Router internals
Router internalsRouter internals
Router internalsJinank Jain
 
Chapter 2 (Part 2)
Chapter 2 (Part 2) Chapter 2 (Part 2)
Chapter 2 (Part 2) rohassanie
 
Performance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro ProcessorPerformance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro ProcessorDileep Bhandarkar
 
Threading Successes 03 Gamebryo
Threading Successes 03   GamebryoThreading Successes 03   Gamebryo
Threading Successes 03 Gamebryoguest40fc7cd
 
Describr the features of pentium microppr
Describr the features of pentium micropprDescribr the features of pentium microppr
Describr the features of pentium microppredwardkiwalabye1
 
Profiling And Optimization Of Software Base Network Analysis Applications
Profiling And Optimization Of Software Base Network Analysis ApplicationsProfiling And Optimization Of Software Base Network Analysis Applications
Profiling And Optimization Of Software Base Network Analysis ApplicationsHargyo T. Nugroho
 
Lcu14 101- coresight overview
Lcu14 101- coresight overviewLcu14 101- coresight overview
Lcu14 101- coresight overviewLinaro
 

Similar to Intel processor trace - What are Recorded? (20)

Control Unit (CU) – Part 2
Control Unit (CU) – Part 2Control Unit (CU) – Part 2
Control Unit (CU) – Part 2
 
OSLec 4& 5(Processesinoperatingsystem).ppt
OSLec 4& 5(Processesinoperatingsystem).pptOSLec 4& 5(Processesinoperatingsystem).ppt
OSLec 4& 5(Processesinoperatingsystem).ppt
 
03 Buses
03 Buses03 Buses
03 Buses
 
Operating System 3
Operating System 3Operating System 3
Operating System 3
 
Computer function-and-interconnection 3
Computer function-and-interconnection 3Computer function-and-interconnection 3
Computer function-and-interconnection 3
 
Computer function-and-interconnection 3
Computer function-and-interconnection 3Computer function-and-interconnection 3
Computer function-and-interconnection 3
 
03. top level view of computer function & interconnection
03. top level view of computer function & interconnection03. top level view of computer function & interconnection
03. top level view of computer function & interconnection
 
Chapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and InterconectionChapter 3 - Top Level View of Computer / Function and Interconection
Chapter 3 - Top Level View of Computer / Function and Interconection
 
Ch 3 95
Ch 3 95Ch 3 95
Ch 3 95
 
Ch14.run time support systems
Ch14.run time support systemsCh14.run time support systems
Ch14.run time support systems
 
Router internals
Router internalsRouter internals
Router internals
 
Chapter 2 (Part 2)
Chapter 2 (Part 2) Chapter 2 (Part 2)
Chapter 2 (Part 2)
 
Chapter1
Chapter1Chapter1
Chapter1
 
Performance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro ProcessorPerformance Characterization of the Pentium Pro Processor
Performance Characterization of the Pentium Pro Processor
 
Threading Successes 03 Gamebryo
Threading Successes 03   GamebryoThreading Successes 03   Gamebryo
Threading Successes 03 Gamebryo
 
Describr the features of pentium microppr
Describr the features of pentium micropprDescribr the features of pentium microppr
Describr the features of pentium microppr
 
Counit2 2
Counit2 2Counit2 2
Counit2 2
 
Profiling And Optimization Of Software Base Network Analysis Applications
Profiling And Optimization Of Software Base Network Analysis ApplicationsProfiling And Optimization Of Software Base Network Analysis Applications
Profiling And Optimization Of Software Base Network Analysis Applications
 
Process
ProcessProcess
Process
 
Lcu14 101- coresight overview
Lcu14 101- coresight overviewLcu14 101- coresight overview
Lcu14 101- coresight overview
 

Recently uploaded

Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . pptDineshKumar4165
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startQuintin Balsdon
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...tanu pandey
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...Call Girls in Nagpur High Profile
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Standamitlee9823
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 

Recently uploaded (20)

Thermal Engineering Unit - I & II . ppt
Thermal Engineering  Unit - I & II . pptThermal Engineering  Unit - I & II . ppt
Thermal Engineering Unit - I & II . ppt
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Palanpur 7001035870 Whatsapp Number, 24/07 Booking
 
Design For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the startDesign For Accessibility: Getting it right from the start
Design For Accessibility: Getting it right from the start
 
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...Bhosari ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready For ...
Bhosari ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready For ...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...Booking open Available Pune Call Girls Pargaon  6297143586 Call Hot Indian Gi...
Booking open Available Pune Call Girls Pargaon 6297143586 Call Hot Indian Gi...
 
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night StandCall Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
Call Girls In Bangalore ☎ 7737669865 🥵 Book Your One night Stand
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Netaji Nagar, Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 

Intel processor trace - What are Recorded?

  • 1. Processor Trace WHAT ARE RECORDED? Pipat Methavanitpong +PipatMethavanitpong @fulcronz27
  • 2. Foreword  This work is done solely by myself without support from Intel  Information in this document is derived from  IA64 System Programming Manual – Chapter 36  Some are from my understanding  Mistakes or wrong information may appear  I am willing to update and correct errata  Please contact me via Google Hangout  I am not responsible for damage using this document
  • 3. Objective  Give summary of data generated from Intel PT  Include relationships between data types partially  Not include its mechanism and controlling
  • 4. PT Overview  Machine instruction-level tracing  Use dedicated hardware to trace  Convention uses software to trace software  Bird eye view observation  Can fully reconstruct execution at Analyze time  Record events that cannot be refer solely from binary  Usage  Low-level debugging  Fine tuning performance  State recovery
  • 5. Background  At the lowest level programs are chunks of machine instructions  Processor executes machine instructions in sequential fashion  Processor does not execute in sequence when  Executing a redirecting machine instruction  Handling an interrupt or an exception (asynchronous event)  …  Execution context may be changed  Changing execution mode  Page switching  …
  • 6. Pros and Cons Pros  Finest grain in software tracing  Machine instruction level Cons  Design overhead  Additional hardware  Man-picked dynamic events  May miss some categories  Hard to change  Hardware implementation *My own opinion
  • 7. Packet Types 1. Packet Stream Boundary – Interval beats, Sync point for analyzer 2. Taken Not-Taken – Conditional branch decision 3. Target IP – Target address within program binary 4. Flow Update Packets – Target address outside program binary (async events) 5. Paging Information Packet – Modification to CR3 task page base address 6. Time-Stamp Counter – Wall clock data 7. MODE – Execution mode 8. Core Bus Ratio – Bus clock ratio 9. Overflow – Internal buffer overflow 10. PAD – Alignment purpose
  • 8. Packet Summary PIP MODE CBR Execution PSB OVF Processor Trace Packets TNT TIP Inside traced program Redirection FUP Outside traced program Environment Trace Alignment Misc PAD TSC Time *does not imply packet combination
  • 9. Taken Not-Taken (TNT)  A group of binary decisions  2 types of event  Conditional branch  Taken(1) / Not taken(0)  Unmodified return address  Taken(1)  2 sizes  Short TNT – 8-bit packet contains 6 decision bits  Long TNT – 64-bit packet contains 47 decision bits  No need to fill all the bits  Partial TNT when generates other packets in the middle Decision Taken (1) Not Taken (0)
  • 10. Target IP (TIP)  A destination address within traced program  Used for  Indirect jump / call – use an address from a register or memory  Modified return address – return address on a call stack is modified  Has different packet signature from FUP  Has 2 extra variants  TIP.PGE – Packet Generation Enable  TIP.PGD – Packet Generation Disable
  • 11. Flow Update Packet (FUP)  A destination address outside a traced program  Generated when asynchronous event happens  External interrupts  Exceptions and faults  X instructions  #SMI  WRMSR that clears TraceEn (one of flags that control tracing operation)  Generated in combination with other packets (not talked here)  Has different packet signature from TIP
  • 12. Page Information Packet (PIP)  Keep track of page information  Current linear address range  CR3 register contains task’s page base address  Generated when CR3 is modified  Has exceptional cases
  • 13. MODE packet  Record of processor modes that affect  Execution behavior  Analyze operation  2 modes are recorded  Execution modes  16- / 32- / 64-bit  TSX transaction operations  Begin / commit / abort  Either HLE or RTM
  • 14. Core Bus Ratio (CBR) Packet  Tells current core:bus ratio  Cannot tell CBR change starts affecting which IP  Generated when  CBR changes  As a part of PSB+
  • 15. Packet Stream Boundary (PSB)  Generated every 4k traces  Like heartbeats for trace operation  Analyzer searches for this packet first to start decoding  PSB itself does not contains any information  Just pure binary signature  Generated in combination with other packets  A whole pack is called PSB+  Tells current execution environment
  • 16. Overflow (OVF) Packet  Generated when  PT happens to overflow its internal buffer  Analyzer skips to next FUP or TIP.PGE
  • 17. PAD  Simply padding  No information contained  Improve packet-alignment  Or some implementation reasons
  • 18. Time-Stamp Counter (TSC)  Give wall clock time  Included in PSB+  Precedes CBR packet