Status – Week 291 Victor Moya. Tracing 3D applications Three layers or levels for tracing: Three layers or levels for tracing: 3D Appl API Driver GPU.

Slides:



Advertisements
Similar presentations
COMPUTERS: TOOLS FOR AN INFORMATION AGE Chapter 3 Operating Systems.
Advertisements

GPGPU Programming Dominik G ö ddeke. 2Overview Choices in GPGPU programming Illustrated CPU vs. GPU step by step example GPU kernels in detail.
Memory Protection: Kernel and User Address Spaces  Background  Address binding  How memory protection is achieved.
Status – Week 257 Victor Moya. Summary GPU interface. GPU interface. GPU state. GPU state. API/Driver State. API/Driver State. Driver/CPU Proxy. Driver/CPU.
Anti-Cheating Mechanisms for Computer Games Michael Rudolph Jason Cook.
Operating System Security : David Phillips A Study of Windows Rootkits.
LINUX-WINDOWS INTERACTION. One software allowing interaction between Linux and Windows is WINE. Wine allows Linux users to load Windows programs while.
1 Module 11 Supporting Applications. 2  Overview Subsystems Overview Supporting Win32-based Applications Supporting MS-DOS-based and Win16-based Applications.
UNIX Chapter 01 Overview of Operating Systems Mr. Mohammad A. Smirat.
INTRODUCTION OS/2 was initially designed to extend the capabilities of DOS by IBM and Microsoft Corporations. To create a single industry-standard operating.
Operating Systems. What is an Operating System? A layer of software between users/applications and the hardware. The first program loaded onto a computer.
Status – Week 259 Victor Moya. Summary OpenGL Traces. OpenGL Traces. DirectX Traces. DirectX Traces. Proxy CPU. Proxy CPU. Command Processor. Command.
© 2004, D. J. Foreman 1 CS350 Operating Systems. © 2004, D. J. Foreman 2 Administrivia  Assignments ■ Homework on most chapters ■ Approximately 8 lab.
Status – Week 270 Victor Moya. Summary ShaderEmulator. ShaderEmulator. ShaderSimulator. ShaderSimulator. Schedule. Schedule. Name. Name. Projects. Projects.
Status – Week 208 Victor Moya. Summary Traces. Traces. Planification. Planification.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Chapter 2: Operating-System Structures Modified from the text book.
Status – Week 260 Victor Moya. Summary shSim. shSim. GPU design. GPU design. Future Work. Future Work. Rumors and News. Rumors and News. Imagine. Imagine.
CSE328:Computer Graphics OpenGL Tutorial Dongli Zhang Department of Computer Science, SBU Department of Computer Science, Stony.
MDK-ARM Microcontroller Development Kit MDK: Microcontroller Development Kit.
Week 6 Operating Systems.
Tanenbaum 8.3 See references
Debugging techniques in Linux Debugging Techniques in Linux Chetan Kumar S Wipro Technologies.
Computer Software. Evolution of Programming Languages Machine Languages Assembly Languages High-Level Languages Fourth-Generation Languages.
Chapter 8 Windows Outline Programming Windows 2000 System structure Processes and threads in Windows 2000 Memory management The Windows 2000 file.
Matt Weir. Our Original Goal To create a data logging system across the kernel with accurate timing that will monitor data as it moves up and down the.
Upgrade to Real Time Linux Target: A MATLAB-Based Graphical Control Environment Thesis Defense by Hai Xu CLEMSON U N I V E R S I T Y Department of Electrical.
Virtualization Concepts Presented by: Mariano Diaz.
OS provide a user-friendly environment and manage resources of the computer system. Operating systems manage: –Processes –Memory –Storage –I/O subsystem.
C O M P U T E R G R A P H I C S Jie chen Computer graphic -- OpenGL Howto.
CSC 461: Lecture 41 CSC461: Lecture 4 Introduction to OpenGL Objectives: Development of the OpenGL API OpenGL Architecture -- OpenGL as a state machine.
Software Writer:-Rashedul Hasan Editor:- Jasim Uddin.
Chapter 2: Operating-System Structures. 2.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 2: Operating-System Structures Operating.
Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.
CS 444 Introduction to Operating Systems
ROOT Team Meeting October 1 st 2010 GUI thinking and testing ideas OpenGL GUI Root Team meeting 01/10/2010.
Editing & Compiling: UNIX vs. IDE and an Intro to Architecture.
Introduction to OpenGL Programming Jian-Liang Lin 2002.
CE Operating Systems Lecture 3 Overview of OS functions and structure.
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
XGL: X11 replacement ? O.Couet, ROOT meeting 11/07/2006.
The Cg Runtime Cyril Zeller. Cg Pipeline Graphics programs are written in Cg and compiled to low-level assembly code... Cg Runtime API...
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
3D graphics in Erlang Jakob Cederlund -
Computer Graphics Lab 1 OpenGL.
Chapter 2. System Structures
Copyright © Curt Hill Operating Systems An Introductory Overview.
Chapter 1 Basic Concepts of Operating Systems Introduction Software A program is a sequence of instructions that enables the computer to carry.
Introduction Characteristics of USB System Model What needs to be done Platform Issues Conceptual Issues Timeline USB Monitoring David Harding Front page.
System Programming Basics Cha#2 H.M.Bilal. Operating Systems An operating system is the software on a computer that manages the way different programs.
Some of the utilities associated with the development of programs. These program development tools allow users to write and construct programs that the.
OPERATING SYSTEMS (OS) By the end of this lesson you will be able to explain: 1. What an OS is 2. The relationship between the OS & application programs.
Integrating Advantech PCI I/O cards into EPICS. Outline ANTARES computer control and data acquisition systems architecture STAR computer control and data.
Virtualization Neependra Khare
Computer System Structures
Chapter 4: Threads Modified by Dr. Neerja Mhaskar for CS 3SH3.
Voice Controlled Robot by Cell Phone with Android App
Current Generation Hypervisor Type 1 Type 2.
Chapter 2: Operating-System Structures
Operating System Structure
Operating System Structure
Chapter 4 The Power behind the Power
OS Virtualization.
Unit 20 Software Part 2.
Assembly Language for Intel-Based Computers
Unit 20 Software Part 2.
Lecture Topics: 11/1 General Operating System Concepts Processes
Chapter 4 The Power behind the Power
Software - Operating Systems
CSE 451: Operating Systems Autumn Module 24 Virtual Machine Monitors
Presentation transcript:

Status – Week 291 Victor Moya

Tracing 3D applications Three layers or levels for tracing: Three layers or levels for tracing: 3D Appl API Driver GPU API Trace Driver Trace (IOCTL?) GPU Commands Trace OS

Tracing 3D applications Each layer is more difficult to trace (kernel level code) and less documented (rather not documented at all). Each layer is more difficult to trace (kernel level code) and less documented (rather not documented at all). APIs are (and must) fully documented and easy to trace (user level). APIs are (and must) fully documented and easy to trace (user level). We need all the parameters (vertexs, primitives, textures, bitmaps and other parameters). We need all the parameters (vertexs, primitives, textures, bitmaps and other parameters). Timing needed? API seems to need just sorted trace. Timing needed? API seems to need just sorted trace.

API Traces OpenGL: OpenGL: Open standard (yet :P). Open standard (yet :P). Open source implementations (Mesa). Open source implementations (Mesa). GLSim( a-01-fall/glsim.html): provides the source of an instrumented OpenGL library (linux and win32), tools and trace examples (quake, unreal). GLSim( a-01-fall/glsim.html): provides the source of an instrumented OpenGL library (linux and win32), tools and trace examples (quake, unreal). a-01-fall/glsim.htmlhttp://graphics.stanford.edu/courses/cs448 a-01-fall/glsim.html Trace sizes: binary gziped format (tlg.gz, glt.gz from GLSim), Unreal 185 frames 57 MB, Quake3demo MB, qtpvr 734 frames 27 mb. Trace sizes: binary gziped format (tlg.gz, glt.gz from GLSim), Unreal 185 frames 57 MB, Quake3demo MB, qtpvr 734 frames 27 mb.

API Traces DirectX/Direct3D: DirectX/Direct3D: Propietary API. Graphic chip manufacturers implement a smaller (hidden?) API behind the open API. Propietary API. Graphic chip manufacturers implement a smaller (hidden?) API behind the open API. Debug DLLs: amount of information they provide unknown (symbols, OutPutDebugString). Debug DLLs: amount of information they provide unknown (symbols, OutPutDebugString). Use an instrumented DLL (GLTrace). Has to be implemented, multiple DLLs in D3D, functions that must be implemented. Use an instrumented DLL (GLTrace). Has to be implemented, multiple DLLs in D3D, functions that must be implemented. Use a debugger (win32 debug API) to trace all the DirectX/Direct3D function calls. Use a debugger (win32 debug API) to trace all the DirectX/Direct3D function calls. Use WineX (open source DirectX emulator for Linux) to get traces of DX/D3D calls. Use WineX (open source DirectX emulator for Linux) to get traces of DX/D3D calls.

API Traces Conclusions: Conclusions: OpenGL would be rather easy to obtain in Linux: GLSim, Mesa, DRI. OpenGL would be rather easy to obtain in Linux: GLSim, Mesa, DRI. OpenGL in Windows can be easily achieved as it is only a task of replacing opengl32.dll (and maybe linking with your own opengl.lib). GLSim compiles for win32. OpenGL in Windows can be easily achieved as it is only a task of replacing opengl32.dll (and maybe linking with your own opengl.lib). GLSim compiles for win32. Use GLTrace util (Linux and Windows). Not tested yet. With source code. Use GLTrace util (Linux and Windows). Not tested yet. With source code. DX/D3D traces in Windows could be done also with instrumented DLLs. Some problems: protected dll names (try with DOS), multiple files, functions. If not a debugger/tracer could work. DX/D3D traces in Windows could be done also with instrumented DLLs. Some problems: protected dll names (try with DOS), multiple files, functions. If not a debugger/tracer could work. DX/D3D traces through emulation with WineX implies modifying WineX code (not hard). Problem: how much of the D3D functionality is already implemented. DX/D3D traces through emulation with WineX implies modifying WineX code (not hard). Problem: how much of the D3D functionality is already implemented.

Driver Traces Two approach: Two approach: Hack the kernel: instrument (through kernel debugger or modified drivers) Hack the kernel: instrument (through kernel debugger or modified drivers) Hack the access to the driver: instrument the API library and intercept all the IOCTL calls (or whatever call is used to access the driver). Only a normal debugger/tracer (custom though) is needed. Hack the access to the driver: instrument the API library and intercept all the IOCTL calls (or whatever call is used to access the driver). Only a normal debugger/tracer (custom though) is needed.

Driver Traces Linux: Linux: DRI provides the source code for API and kernel level drivers for some graphic chips (ATI up to R200 and 3dfx). Would be easy to get driver traces or even raw hardware commands for those chips. DRI provides the source code for API and kernel level drivers for some graphic chips (ATI up to R200 and 3dfx). Would be easy to get driver traces or even raw hardware commands for those chips. Modify kernel to support debugging/tracing for specific drivers. If it can be done would work for most Nvidia chips. Just intercept IOCTL calls. I don’t know how it really work the Linux kernel and its drivers. Modify kernel to support debugging/tracing for specific drivers. If it can be done would work for most Nvidia chips. Just intercept IOCTL calls. I don’t know how it really work the Linux kernel and its drivers.

Driver Traces Windows: Windows: Hack IOCTL in the API (in hardware specific part, not MS) seems the easier. But requires to discover where are those calls. Hack IOCTL in the API (in hardware specific part, not MS) seems the easier. But requires to discover where are those calls. Kernel level debugging? Maybe through vxds (virtual devices, give access to kernel level). Seems hard and would need more research. Kernel level debugging? Maybe through vxds (virtual devices, give access to kernel level). Seems hard and would need more research.

Hardware command trace Very difficult to get: Very difficult to get: No source code. No source code. Unknown command specifications. Unknown command specifications. Kernel level. Kernel level.

Hardware command trace Linux: Linux: Try to modify kernel for intercept ‘access to hardware’ from the drivers. Requires to know how the hardware is accessed (IO, mem. mapped IO, DMA …). I’m not sure if it is really possible. Try to modify kernel for intercept ‘access to hardware’ from the drivers. Requires to know how the hardware is accessed (IO, mem. mapped IO, DMA …). I’m not sure if it is really possible. Windows: Windows: Same, but without access to kernel code. Through somekind of vxd. Same, but without access to kernel code. Through somekind of vxd. Emulation: full PC emulation would provide with a slow way to get anything we want. Emulation: full PC emulation would provide with a slow way to get anything we want.

Conclusion API traces seem the easiest option. API traces seem the easiest option. API traces used by Standford and others (and they should know what they are doing). API traces used by Standford and others (and they should know what they are doing). API and drivers hide the real semantic of the hardware, but it is really so different? API and drivers hide the real semantic of the hardware, but it is really so different? If real semantic is important perhaps could be posponed. If real semantic is important perhaps could be posponed.

Planificación ?