WWDC2004 Session 300

Transcript

Kind: captions Language: en ladies and gentlemen please welcome vice president of development technologies Ted goldstein good afternoon what an amazing day it's been so far I hope to keep this on a roll we have a lot to talk about I want to give you a quick agenda what we're going on give you an update on what we've done this last year with the Xcode tool suite and then talk about something everybody cares about its performance then where we're going with what's next the future for xcode and the compiler and runtime which is such an important part of making applications great on Mac OS 10 performance tools are critical critical part of how you make your application faster and we want to give you all the help not just making the compiler produced great code for you but also give you the assistance it takes to make the perform your applications really perform and then finally how can you use xcode with all the great frameworks and SDKs you sort this morning in this afternoon so let's just write in and give you a quick update on the echo 20 sweet so in this last year we put out three releases of Xcode 101 dot11 dot 2 and 1 dot 0 was the what's the feature release it had predicted compilation 0 link fixed continue distributed builds smart groups and code sets a very rich build in 1001 was too we elaborated and enhance both performance capabilities of that the stability and robustness of it and filled in a few of the missing details and workflow issues third-party tools quickly jumped in bbedit and subby that edit and perforce almost immediately out of the gate was great third-party support to show that xcode was not just our and ireland by itself but included access for other tools in it in the one that one time frame we had added support for ibm's terrific xlc and xls C C++ and Fortran and Objective C compilers and that is great safe port our benefit to the platform we're with IBM they of course also helped develop the 970 CPU the g5 processor that apple shipped and the combination is incredible much of the great scientific computing that's been done over the years has been done in Fortran it's been like I can remember is it undergraduate in school that we said I don't know what language people will be using in the year 2000 but it will be named Fortran well it's still true it's still named Fortran and it's a great language and they've been doodles of template and other components and capabilities that add to Xcode this includes conduits and other cut and Apple script plugins and such that really round out the corners of making Xcode terrific and you've responded with over 300,000 downloads of these tools and that's i want to thank you very much i think that's an incredible show support for the platform of course it's great to have the volume of users using the tools and it's also extremely important us to be working with our important developer partners folks like adobe are helping us to make xcode and GCC terrific for their tools here's a quote from fateh berman lead architect and head of indesign and we think it's just an incredible thing to be working with partners because frankly a large code base such as in design takes a lots of resources to to port it to a new environment and as well for us to help the compiler really encompass such a such an enormous code base we learn and improve the products for all of our developments with each step we also see this as well with quark and Clark has been a fabulous partner working with us to make Xcode grey and we find that it's so important so important to to be doing this process in partnership with these key developers of course this morning we heard from meijer engineering from bob bennett and here are very happy to say that Maya six and my HP credible credible applications developed with Xcode that using the benefit the productivity benefit into performance gains that Xcode and GCC provides to deliver on g5 performance so that has been an amazing thing now i want to invite rich siegel CEO of bare bones edit they won't software sorry to talk a little bit about building bbedit with xcode thank you very much dead good afternoon everybody it's great to be here so when Apple announced exod a year ago almost today in fact we were really intrigued that bare bones software we've got a long history of course not only experience using developer tools but also some of them have some of us have worked on them and we know that a diversity of developer tools is a good thing to have it's good for the ecosystem it makes a better developer experience and that makes a better platform so when X go 1 point 0 ships in October we took a good close look at it we kick the tires and we thought about what's really important to us when it comes to making better products to serve our customers and came down to really three simple things the first ones compiler quality and here great job in Xcode TCC is an excellent compiler and I'll get into that shortly the next thing was build productivity usually the first thing we do when there's a platform change such as a new hardware platform or a new tools platform is we'll sit down and we'll without a stopwatch we'll see how long it takes to build our product line and finally the really important thing for us was to be able to continue using as many of our existing tools as we could so on the first front compiler quality well TCC is a great compiler its language conformance is very good and what we found was when we turned on all the warnings which Xcode makes really easy to do because it's a great GUI for GCC is you know we went through we turned on all the warnings and we found a few latent bugs and we found some good code quality improvements and so the result is we have a cleaner codebase it's more maintainable and we can run it through even more compilers such as for example xlc if we choose also the generated code is favored really comfortable to pretty much everything else we've used we gave up nothing in code quality the next thing as we mentioned was the productivity improvement of build times and there what we found that was that was distributed builds we were seeing about a thirty to forty percent decrease in build times compared to building on a single machine so we have a little bit less time to get a cup of coffee while we're building but in spite of that it turns into a real productivity improvement the beautiful thing about that however was that we were able to realize this improvement without any capital investment whatsoever we didn't have to go out and drop 20 grand on a dedicated build part instead we were able to use existing hardware in the office administration workstations engineering work stations operations marketing even the machine that drives our CD duplicators part of the inhales build farm so no capital expense of free thirty to forty percent in build times it was like having our cake and eating it too it just didn't get any better finally of course was the ability to use our own tools in here this was crucial and the external editor support in xcode was great I mean can you imagine us not using bbedit so we were really pleased to be able to do that and in fact on the converse not being able to do that would've them a real deal breaker so I'm happy to say that as a result of treaty of really meeting through these three basic tests compiler quality productivity through building performance and being able to use our existing tools all of our product development with the exception of maintaining current shipping versions but all of our products bbedit textwrangler Mayo Smith and super get info are being built with Xcode today so I just wanted to thank Ted and his team for delivering a great tool chain thank you ready it's so important and we focus on performance in every part of the development cycle spoke on the build time the launch time the runtime and development in debug time and each of these areas is critically critically important with Xcode one point oh we placed immense amount of emphasis on the backfill time that what you do in the office in this last year though a lot of people said to us Ted you know that's great when I'm in the office and I can use distributed bills what about when I'm sitting in a cafe drinking that cup of coffee on my laptop and there of course we sold this last year we have turned our attention really from the the the main office built on to really the cafe bill time if you work with and so I'm happy to say that now extra bills performance is thirty-three percent faster on laptops we also get another eighteen percent improvement on dual process of machines as well and so we think of these things is incredibly important and we will continue to make improvements on each of the areas i think that it's critically important to realize that GCC at the heart of this is already an amazingly fast compiler we already and we're innovating in multiple ways one of the most important ways that we're doing this is something you think of a short cut compilation and that is we are ignoring unnecessary declarations and short-circuiting unnecessary recompilation what's an unnecessary recompilation for example when you hit a space or put in a comment really the text and program meaning of the code hasn't changed but just the just the only the white space if you will of the program is change and so this is coming out it didn't make your DVDs but will be in a future download beta coming along soon now let's turn our attention over the launch performance the time it takes for the program to start up Mac os10 has seen continuous evolution of the Marco object file format among the kick the capabilities that we typically advise people is to prove applications cream binding is the set of setting up the your application for a given release so that the addresses of the librarians are already located in the executable text segment but but the feedback on pre binding has not been good this is a great comment from on insanity org I really hate the fact that Mac os10 requires be binding for Marco applications and their whole websites pre binding is painful it's time consuming it's error-prone and now I'd like to say that it's unnecessary for most applications starting in Jaguar but continue on in Panther and then resulting in some work that we we finally put it all together in 10 3 4 we made it so that provide Maya sick for example one custom that we work with who was taking their application from CSM to Marco originally in an unproven believe and the opportunity bound state takes about 48 seconds to launch and that kind of it pins on on the development cycle in the pre pounds state it takes about 12 seconds and intends to be four and tiger it takes only five seconds in the not in the dynamically down not pre bound state why should we do this so fast because we put in important things like to level main phases and hint to help to quickly find symbol so it's not searching all of your address space as it's the binding is going on but it's all but it's doing that very quickly and searching a very small subset so this is an important technology and I think it's very helpful r2 that has in Tiger we didn't made it one step further with studying instincts applications like Safari for example these are some preliminary measurements where we have both the pre binding and the dynamically BAM the pre map state is no difference we cannot tell the difference now you should always you know this is a preview release we want to hear your feedback so please do some studies but we believe that pre binding is no longer necessary so that's pre binding so what's the next to Xcode with Xcode we have what do we see I think Peter had already spent on the RSS feed so we already saw some of the press release is hitting any Apple news site that there is going to be an Xcode two point oh but in fact there are two releases next code 154 Panthers and an Xcode 2.0 on tiger and we've gotten this sequence you've given us the feedback that says you know Ted it's great for us to get the next release but we don't to wait that long and we want to use the new tools and features that you have on the current operating system that were shipping today so X sub 1 point 5 contains most of the goodies are that two point O has suddenly everything that that can work in 15 context it doesn't take advantage of important frameworks and new features that are two that are tiger only so we're going to try to do this I'm not going to make a firm commitment but definitely we've heard you that you that you want to have great tools at the same time as you have the forward-looking toward so let's focus in first on one side and really 15 is the feature release where we focused on the features of a sport principally among that is an important feature called dead coach dripping essentially removing the unnecessary code out of a program we also realized that even though we're doing the pretty amazing formatting and code sense you also want to have faster edit performance and edit performance is improved in many cases by 10 X and even warrant in for the very large file I think what I'm saying that we love java and Apple script but we're then what the code says supports in Xcode and in 15 you've got it you've got support for code sense and incremental compilation mix and and and many other build system teachers in putting in for java and Apple script you'll see some of that later today and finally subversion he I thought I'd have to explain to you what subversion was so for the two people knew who don't know subversion is a new version of CBS or a a CVS type system source code management system its many people believe it is the logical successor to CBS all rights done by the same folks who did webdav so it has a terrific network orientation and so now if the version support is built into Xcode 15 we've also made a number of debugger improvements and I want to bring up Chris freezing and Gabriel flight states are from trans gaming thanks Ted so I trans gaming we work on software portability tools for the entertainment software industry specifically what that means is that we work to provide tools and technologies to allow developers and publishers to take their games for one platform to another very quickly and cheaply now we've been working on a title called Tron to point out which was recently released in fact it can actually go to compusa and can pick it up in the stores and one of the things we weren't into a lot and we're dealing with porting games is the fact that a game by its nature takes a huge amount of CPU huge amounts of RAM and most importantly wants to actually take over your entire desktop and lock your medicine into that window so try to debug a game in a on a single CPU can be extremely difficult in cumbersome you have to kind of change your rendering code to put into a window and and and share the RAM especially with huge symbols that you get with with some of these large projects so one of the features that Xcode 1.5 provides we've been playing with the last week or so is cross machine debugging what we're going to show you here is running the game 20 point 0 on one machine while debugging it on a completely different machine now Chris reason has been intensively training in the Tron to point a light cycle game over the course of the lunch break and he's going to he's going to demonstrate that the result of that training please Chris go ahead we have sound on the game machine oh oh now you know I I believe you i was watching Christian I believe this problem is not it's not the chris didn't train enough the problem here is really something very different something that you wouldn't necessarily expect on a light cycle but i think chris is going to go here he's going to show you like the character he was set up to play and clearly the problem here is that his character had spiky hair it was impeding the air flow in a life cycle it just it just wasn't working so we're going to switch over to actually we're not going to talk or yet what I'm going to do here is I'm actually going to go on this machine and activate a break point you'll see that the game machine is stopped let's choose over to the bugger machine for a moment and what we're going to see on the debugger machine is the actual code that's executing at this point which is in the middle of trends gaming's proprietary director ed rendering technology which allows us to take games written for win32 and bring them to other platforms and we've got we've got a little extra piece of code here that I that I added that can deal with the whole spiky hair problem if a certain kind of rendering is happening we're just going to mask it right out all right so let me go back to the breakpoints and disable that one and let's go back to the game machine and on the game machine will see that we have we haven't actually continued yet on the game machine we will still see the spiky hair and I'm gonna hit continue on the debugger and boom the spiky hair problem is gone so Chris will not have any more trouble with with the light cycles next time around you know thanks very much that's the demo thanks Ted how would I said remote debugging is also truly important when you're on two machines what's the one other thing I'm sorry was there one other thing there is one other thing it's going to take us a second to get all ready we'll run that will run that right before your neck so gentle okay great so remote debugging numerous other features in terms of global that support the adult rate expressions and host of interesting features you'll see in as well in the 2 point 0 demo so let's go to a tron level 2 i mean xcode level two so a very big part of what people care about is to be able to launch quickly into their application and quickly over to xcode you want to actually see our expert laid out in a way that's similar and very good for you so we've added a number of important new layout that that are extremely familiar for people from both the visual studio and codewarrior world we also saw earlier today on Jenna spanker gives the modeling with a database that same modeling technology is also available for object-oriented programming for java objective c c c++ and we think that's going to be a very big help to you even if you're not doing database programming that's on the flood says in the back end we've added support for GCC 35 and 64-bit tools GCC 35 is the next generation of GCC and it has some amazing performance features some of which are being innovated by Apple and IBM working together and 64-bit support so that you can generate to take advantage of the full address space seem to spend and some time talking about that too there are also important use performance tools and some incredible SDKs that Xcode is essentially the gateway to to get to the traditional Xcode layout is all very nice and compact and very late and it has a number of great features but one of the things of course is to have the debugger you have to open up a separate window and that kind of takes your mind away from it okay we're looking at the console window often times to actually see it you're then doing your own window management and one of the things that's very popular on in Microsoft platform visual studio world is an all-in-one view where everything is nice and compact and so we've added this now x.x code you have a new all-in-one view that essentially puts the debugger the all of the tools embedded within spiraling frame of Xcode but of course it's not it's important to to have a quick and easy way to switching see this is a new toolbar icon on the top to be able to rapidly switch function from one to the other the other important size of things is this idea of a condensed view people familiar with code where they'll have many many windows spawns or of a central palette and that also is a new part of what Xcode to point o supports so these two incredible features i think help and why don't we take a look at this and some of the new features let's bring Matt Froelich and Chris Espinosa up to give a demo of x co 2 point 0 thanks Eddie X go to one dot 5 and x co 2 point 0 are replete with features we only have a short time today so Chris and I are going to demo two of them but we encourage you to go to the rest of the sessions this week to check out some of those additional features in addition to being a standard ide Xcode provides a number of facilities for dealing with large problems that you have let's stick on the whole concept of debugging for a moment global variables kind of a necessary evil in working everybody has them and even if you have more than those just in your application there are potentially thousands in all the shared libraries that your application loads as being an application on Mac OS 10 question is how do you deal with it how do you figure out the value how do you keep track of those as part of your development works like new and Xcode we're providing the ability to look at global variables in your application in a very simple and easy manner what you'll see right now is that Chris has launched an application called Celestia it's a freely downloadable application for looking at 3d renderings of in this case the universe what we've done is set up a breakpoint under the history option here so we're gonna go ahead and hit that and we're actually gonna stop right in the middle the debugger probably something you're all very familiar with but say at this point we want to actually go and look at something interesting something in this sense of global variables if you go and look up under the debug menu you'll now see there's a tools menu and we have something called the global variables browser Kristen's gonna go ahead and make this window a little bit bigger so we can see some of the more information in here you see on the left-hand side we have list of all the shared libraries that this application knows about and when Chris selects one the right hand side is populated with information from that shared library we can see the name of the global variables file name the value these are all standard views that we can go ahead and reorganize the column view so we can take the file name out of the way to look at something a little more interesting but you can obviously see an apt it here we have a lot of symbols in this case 500 that we're looking at makes it kind of difficult to find the ones you want so we've included standard features like a search field at the top Chris you could go ahead and type in something for example NSF and go ahead and filter all those global variables sounds are the ones that start with a common prefix something relatively easy to do but it makes it very easy to find something by name not necessarily is interesting let's go and look at something forced it's the last your application chris can go ahead and click on that and we're going to load the symbols for the Celestra application once it's done populating Christmas gonna have to go ahead and remove the search field olicity typed in so you can get the prompt Ian's of values back now that we see that let's go ahead and search on something more interesting what if you don't actually know the name of your global variable but you know for example it's an int we can go ahead and change the search to look based on type as we see here and Kristen can go ahead and type in int and now we can see you can actually go find the global variables by type making it very easy to go ahead and look at them so we made it very easy to deal with the concept of large amounts of global variables but how do you get this into your workflow well you'll see that there's a nice little column here called view and you can go ahead and check those corsican go ahead and select a couple of them once we do that if you close the global variables browser and go back to the standards above the review you'll note in the variables display there's an element called Global's but now when he expands it you'll see the global variables so giving the facility to take something as large as global variable and bring it down to a standard workforce on the same concept of this let's talk about designs Chris you want to show them the new design features of extra sure thanks men now you got a taste of the design features this morning in vert Rhonda and on Grace's presentation when they did the core data model for the core data framework presentation this is a new feature of Xcode where we are going to add design features throughout the workflow from the beginning of your application design all the way through deployment in debugging and the first two plugins for design are here on your Xcode to point OCD you've already seen the core data one this morning we're going to show you the class plug-in this afternoon now what's matts going to do is he's going to take to celestia application and he's going to create a new class model of some of the classes in the celestia source code so he picks the class model gives it a name a class models a project file like any other project file is stored in your project directory it's committed to your subversion or CVS repository he's going to pick set of sources folder and he's going to make a tracking model he's going to add that to his group and now he has a model of the sources in that folder now these are the classes now you've probably been familiar with other applications that give you a snapshot or a bird's-eye view of the classes in your application but it's pretty static it's how the the IDE communicates with you what the classes are what you can do with the design tools and Xcode is you can use the class model to communicate to other people what they are so you can move these classes around you can expand them or collapse them to show their methods and their functions and you can make the design look like how you think the application works save it with your project and then when other people download or check out your project and open it up they can explore it using the class model that you've created now this is of course wired to the project what maps going to do is going to select a method in one class he's going to go straight to the implementation that's fairly easiest easy and obvious he's going to go back and using the menu who's going to go to the definition in the header file and you can also because all of your classes may defend from classes in the Apple frameworks which have documentation behind them he can select the class and go to its documentation in the online documentation instantly you can go either to the object itself or directly to the method of the property on the object so these design features are all built in now you've seen what we can do with modeling your classes but you're probably wondering hey why do I have to create a you know separate file and store it in the repository and in the project and you're probably wondering about scalability you know how does it do one really well now first what we're going to do is show that it's tracking it's live it's connected to your project so as you change your project the model changes with you so what maps going to go do now is he's going to add another folder of sources to the model and there they go in the design automatically updates to show new classes if you add them or remove them that's also true for methods and properties in the classes themselves so now you're wondering well why do I have to create a model and store it in the project if I just want to take a look at somebody else's project and see how its laid out or take a look at an apple framework and and how does it scale the big frameworks anyway well this is why we have this feature called quick models in the class model you just select any group a framework a group of project at target choose quick model and it'll create a model right them in there and this is a document that is a kind of a temporary document it's thrown away at the end of the session but we've just modeled app kit and here are all of the classes and all of the categories and all of the protocols in all of app kid it's about 400 and all and it was generated in less than half a second and so you can throw this way because you can generate it in half second whenever you need to look at it and of course this will of course navigate to the app get headers and to the app get documentation so the design tools in the class modeling tool in Xcode is new it's great it'll help you understand your code it'll help you communicate your code to other others and it'll help you navigate through your code and the Apple code thanks very much thanks Matt and Chris by the way of course great use of that is put it up on the wall in the hallway your boss or thinking really doing something you can find out more about that friday at nine in the modeling and design in xcode session are in north beach so this is I think one of the terrific news features i think is one of the starring great things in XO two point oh and a reason that to use both extra 2 point 0 and 15 now let's turn our attention to the compiler in the runtime in first let's give a little bit of a road map because we saw a lot of version numbers out and if you're not on the GCC mailing list he may lose track GC c295 is really the oldest compiler anybody is likely to be using and it generated code to g3 and g4 but didn't generate any of those 64-bit 35 instructions 295 it's a compiler that we keep around because it supports original 10 dot one text file format but other than that it really is no great reasons be using 295 anymore the last compiler not the current compiles the last compiler in CC CC 1 and a 2 didn't generate code for g5 the next compiler is just is the currency pilot that everyone should be using is GCC 33 and it has great support for optimization great support for the g5 and so with this coming release we're going to obsolete some compiler now I'd like to obsolete both to 9000 31 but some people still want to shift on getting that one pic text so what we're going to do is we're going to get rid of the 31 compiler and we're going to have the GCC two lines hard to be download only and we think that that's a reasonable compromise offerings so the current compiler 33 is the best is the compiler should be using for shipping products and this makes room for GCC 35 this is the leading edge compiler this compiler has terrific new optimization features a brand-new c++ poor sir it has a also support for long doubles and 35 really is where most of the attention happening in the Free Software Foundation in the GCC community and if you look at it 35 is is really something you want to start getting into give us some feedback on it now putting it on the developer tools distribution so that you can begin working with it but of course it's only in preview mode the big lifting in 35 is in the performance improvements and the we've totally retrofitting the optimization technology something called a single static assignment SS a form is really the the professional and best way to do cogeneration optimization it's a little bit like register renaming for those of you who are familiar with the hardware world and what it does is essentially treat every expression that is computable as a separate arithmetic expression inside the compiler the compiler can n do incredibly good scheduling and overlapping and such that also gives you the ability that very fine-grained control and another terrific feature called o vectorization we've heard a lot this morning about the GPU processing in fact as well the powerpc of course also has in it the Alpha Zac velocity engine processor and that allows us to have this additional processing in parallel in addition to the GPU but on ships are terrific capability now previously in order to take advantage of alpha deck you had to hand write your own intrinsics it has a right essentially very low-level instructions and pay and do the formatting to your instructions so that all your data types began and ended on it on a 16-byte boundary but with auto vectorization would essentially say hey let's let the compiler do it so the pilot can worry about those details and so instead of having to write the order back to re-encode yourself the order vector Iser converts the code and operates and identifies your most most common loops it works best with memory allowing data so if you can structured so that your blocks of memory are on 16 by the lines chunks that's terrific but it doesn't have to be and there are annotations to tell GCC to go and put in and try to keep this the beginning of a data structure on a 16 by the lineman but that's not always possible the compiler will compensate and put in the correct prologue and epilogue code for those loops so what's the payoff well this at the time I made these slides are we were able to execute are these types of instructions in parallel when you have these kinds of arithmetic expressions inside of a loop we can see anywhere from a 4x improvement for its of a vector of values we executed in parallel up to 12 and even 14 X in fact some late-breaking data some tests that I just read this morning have it up to 20 X performance improvement so really amazing amazing improvement that you can get for mortar vectorization for some codes and we think that you're going to like using this feature because it's really very simple to use you just enable it with one checkbox that sort of vectorization now let's turn our attention to 64 bit 64-bit ARM is something that we had in fact on tampa it's in part of the g5 access to our greater than 4 gigabytes of ram but it also we also gave you this flag in GCC in xcode to compile for g5 architecture and this actually did give gives you from c c++ objective-c source code to 64-bit arithmetic operations so long long can already fit in one register and we think the distance is already something that you should be using on g 5a me today on Panther in but what do we actually need with 64-bit memory why do you want to break the 64 of the four gigabytes barrier and we think that in fact a great many application certainly those eight megapixel displays are going to give you lots of opportunity to display all this great data or the supervision so also now new vistas of media genomics proteomics medical engineering and one of my favorite geospatial applications now become possible not to say that we didn't already have techniques for sliding through larger than four gigabytes of there but it was cumbersome in orbit so I'd like to have Peter's give you a demo of a geospatial application can we have this demo machine Ted we're looking at Terra vision it's an open source app that i downloaded from the net tara fishing is a visualization app for terrain data and lets you see terrain data in 3d it's a 32-bit application that takes advantage of a variety of Mac OS 10 graphics frame works behind the scenes there's a 64-bit service application a service process I built that using the tiger preview and the tool chain and lid see readied for 64-bit sure let's let's give it a go so this is a computation not a movie and as we move through this data set will encounter more and more complicated terrain train pieces going from topographical data yet somebody shimmering off to the east Landsat data around the Bay Area and finally this patch of high-altitude aircraft imagery data which gets us down to a resolution of about a meter anybody recognize that feature in the mid Bay at Stanford Stadium and will swing around to see I think that's my house yeah university in Palo Alto you can see the apple store down there I always wanted to visit Stanford's that will roll up this way and see the main academic quad and palm the palm drive a little run up to the dish this is where the radio astronomy towers are sighted and then we'll sprint down actually sprint north towards flac in the foreground of the experimental halls and then the linear accelerator running off two kilometers into the background and there's a curious feature about slack it passes under highway 280 so I'd like to acknowledge the creators of Terra vision Martin ready Yvonne Leclerc and Lee Iverson they did this at sra a few years ago and the take home message here is wood tiger preview you can start to experiment with application architectures that employ processing 64-bit service processes like the ones we've shown you today check it out see if your app would benefit from some 64-bit goodness and enjoy the ride Thanks better so 64-bit addressing and tiger essentially gives you access is much larger data sets how large well we quickly learn more about it by the way in the on Wednesday at 1030am in presidio with the programming for Mac OS 10 session on 64-bit we're doing a staged rollout so initially we're focusing on the lib system functionality basic i/o capabilities that you need and the capabilities to map it from a 32-bit address spaces are into a 64-bit address space 64-bit is an amazing number and if you're a geek like me you love big numbers how is how biggest isn't 64 world 16 exabytes it's that large number which I'm not going to read or 18 times 10 to the 18th and here you're starting to the training and exponential numbers are going to come in very handy really it's it's having access to these much larger data sets really is going to change to some extent the way you think about data and data management and what you just saw in the application of speed demonstrated is essentially we have a 32 bit gooey front damn right but it talks to a 64-bit service address space that service address space can do a lot of the heavy lifting it can access it a uniform memory environment but the 32-bit address space essentially is mapping in the data structures that are needed to present the course in fact frankly there really is no great benefit to doubling the size of a pointer that points to a window there's only acts benefits to be derived from points into your memory that has your actual data in it and so we believe that this is a very convenient architecture it's one that's extremely scalable and it's one that gives you the benefits of 64-bit without having to have to take the big plunge support your entire application from 32-bit to 64-bit so this is what we mean by it's a kind of a scalable architecture so for a bit computing and as you can see we've already demonstrated that it actually works and does actually give great performance today we will actually talk a little bit about the future because I believe that 64-bit has some incredibly interesting emergent properties when we made the transition from 16-bit data to 32-bit data it's not that we all of a sudden had the capabilities to do object-oriented programming and computer graphics in an incredibly intense way in that transition it's not to say that you couldn't do object or easy programming in a 16-bit address space it's just what is all that useful or necessary applications didn't have to scale that large the functionality wasn't all that impressive going from the 16-bit space to 32-bit space all of a sudden now certain capabilities and technologies became very easy in uniform and I believe the same thing will happen now as we move from 32-bit space into 64-bit space now we have an amazing amazing capabilities to access just a breath a breath of data and so I think of this is kind of a super vision right we have this ability now to look at scales of universe and of data to make seamless transitions between data sets are so that detect you know your locality search say instead of google being you know zip code because pinpoint where you are on the globe zoom in there you are ok what's there it's so it's going to unlock incredible vistas and I'd love to see the applications you folks are going to develop with the 64-bit tools we're providing to you today that's 64 bit let's talk about the next generation runtime again this is a little forward-looking we are working on garbage collection why do you want garbage collection well it simplifies coding especially in the threaded multi as a multi-threaded world where events are generated both by the network by the user by perhaps other other people and it can incredibly conclude correctness of your applications and improve the memory efficiency of what you're doing so what we've been cooking up in the lab is semi automatic memory management for objective-c it's fast it has very low lake recedes designed for interactive applications and it's optional you don't have to use it you can on a per application basis or you can either enable it or not enabled it's binary compatible with the frameworks that will be shipping and we believe that that applications should begin experimenting with this kind of a rad feature when it comes out in targets so we really don't understand yet the complete balance yet between high performance applications and the amount of memory footprint it has so this is something where we will be making this technology available in the target time frame and I think it's going to be very interesting but this is not a journey that last in one year right this is something that we will explore together to figure out different ways to tune this technology but I believe it's going to make a very big improvement to productivity of and debugging of applications instead of having to do some sort of the retain release style programming that we do today in Objective C and C++ we will have techniques there say you know what when we want it to leak when it's no longer be referenced by anyone it can just be the garbage collector we claim it so this is cooking up some labs and I'm very excited by this the other side of things is performance tools so for once tools we provide help you make your application great one of my favorite performance tools is shark what is shark shark is a a multi-purpose tool we've enhanced it with functionality merging in capabilities such as sampler into shark and what it does is the profile is everything all the way from the device driver level to the colonel to the applications it has extremely low overhead and it works both in a static and the dynamic Wade annotates the source code and disassembly codes and gives you optimization tips so let's bring on mason finland and sanjay patel to give us a quick demo of shark good afternoon I'm really proud to announce that we have a preview version of shark on your tiger preview disk and we're also going to be available shortly off the FTP sites with a new version of shark and what I'd like to do is just demo some of the features in shark I think the best way to do that is with an open source application that we think was rather cool we found it out on the web called Celestia which you guys already saw with Chris and Matt and it's a simulation of the universe's it's really nice it actually uses real data from JPL to calculate the orbits of the planets and stars and what we wanted to do was see how this application runs on a Mac so here's the less you're running and what did what you have to do if you're going to optimize for performance is that a little metric so we decided to figure out how long it takes to run through this demo and now if we launch shark you can see that we've added lots of features to shark but the main thing we had to do was make sure that it was still very easy to use and the default workflow for most people is simply to hit the start button so right now we're actually taking samples of the system so we're sampling not only celestia all the others are all the running processes on the system by default once per millisecond if we it stops we're now going to process all those samples that we took you can see by default we've got in what we call the heavy view and this is ordered from time spent in the topmost function down now you can also look and say that we've sampled the entire system silesia is taking up a little less than half of the CPU cycles on this system you can see we have a thread top-ups to show you all your threads of execution so let's do a single threaded that explains why it's not getting all of the CPU resources on a dual processor max now we can also look at celestia in what the more traditional tree view so you can see your code executing all the way from Maine down new for shark 40 you can actually view heavy and three simultaneously so that was a big request we've added what we call data mining features as well so we get a contextual men as well as this side drawer which lets you filter out things that you don't want to see for example the system library you can also color your code so it's very easy to figure out where you're spending time now one area we've really improved is the chart view so this is a chronological view of your programs execution in this case we have two processors so we have two charts now we know that celestia is single threaded at this point so let's just focus in on its one thread of execution chronologically now a big feature we added with the zoom slider they can zoom in and out and get a you click on the stack so along the x-axis we have time and along the y axis we have stacks if and you can click or mouse around through here and you can see your stack at any point during your programs execution so now if we go back to the profile view nope probably the coolest feature I think of shark is if you double click on a function and we found this one function in particular called big fix that we're going to look at you see your source code but you don't just see your source code it's actually annotated and it's highlighted and what we did was we made the brighter the yellow is it's more important for your code that's the more important time consuming line of source and so you can see also shark is going to offer you advice when it can these are these exclamation points so for example we have this floating point to integer conversion now this is really bad for a g5 because it causes a serial a serialization of the pipeline now new for shark is the fact that we can look at both source and assembly simultaneously so you can see it exactly what the compiler generated for each line of sorts and when you highlight on a line of sort it automatically highlights and Scrolls the lines of assembly that courts onto each line now for me I generally speak powerpc as well as i do English so we know that's not true for most people so we have this PVC Help button down in the corner and you can see it's actually updating as we scroll through it updates in gives you a description in English of what each mnemonic is that's really cool and so it's really great to be able to focus in on your performance hot spot right away and we have this nice edit button now and this will jump you right into Xcode and the line that's highlighted in your shark viewer is now highlighted in Xcode so you can edit away so if we go back to Celestia you can see as this demo has already been running for over four minutes and this is a original code when we got it we decided we should spend some time optimizing it based on what shark is told us and you can see we would did nine steps now we don't have much time here so let's just show you warp three for a second here if we restart the demo you can see that we're going to do a flight through the universe we're going to stop around Saturn go off to one of its moons and pretty soon here will be done now that's not bad originally this demo took over a thousand seconds to run so we made some improvements at warp 3 but we weren't done we decided we should write altivec code we should do some t5 optimizations we should unroll some loops we should schedule code better and the sum of all that is what we call warp nine and if we take a look at that I got the demo to be a little bit over three hundred times faster from where we started using short once they put up the URL i think lexi is a wonderful application by itself so it send more than five seconds looking at it there are lots more tools performance tools shark is terrific and such but also be able to look at your memory allocations where is it going very often an application to take that is slow it's not the questions algorithmically slow but because it's taking up too much memory features that also short has is to be able to profile on set up the events of when allocations happen there also are standalone applications that you can leverage and work with without the GUI mouth debug object Alec quartz debug for looking to see your course allocation sampler spin control is a great thing when you see the the pizza the quad-city spinning cursor to understand what it is the application is doing great great thing thread viewer accessibility inspectors and verifiers very very important a lot of both both to make your application accessible to the unsighted the terrific new set of capabilities in Mac OS 10 and give you the tools to help make your application accessible so lots and lots of performance tools and analysis tools on developed CD it's worthwhile to to explore it in their sessions on all these features xcode is in many ways the the gateway to to the frameworks on the system and you heard this morning and from retron about a number of the terrific SDKs and tools spotlight the great new SDK dashboard core data all these SDKs have both many medications have additional tools for example quartz composer to better understand how the filters interact so it's a terrific me to spend some time and leverage this core data is a terrific SDK that unlocks the virtues of persistence and database properties oriented programming I think one of my favorites though is going to be the Automator and automator SDK and let's bring on Tim Bumgarner and Todd Fernandez to give us a demo of the Automator action if TK well thank you very much dead and good afternoon developers I hope that you all got a chance to see automator this morning in the keynote while sal did a great job of showing off automated user side and tim is taking advantage of it right now I'm sorry it's already done running a workflow to set up our demo we're here to show you the developer side and the first thing we want to do is show you an action you did not see this morning an action that allows you to create a new email and if you take a look at the actions user interface and Tim please bring up the people picker you'll see that something's missing there's no BCC support so in order to show you how easy it is to create automator actions Tim and I are going to add that support for you now and to do that there's three main steps we need to update our actions user interface we need to add to connect the connections between the new user interface elements and our code and finally we need to add our source code in Apple scripts and objective-c so Tim please open the project in Xcode two point oh and the first thing to notice here is that this is a native target native targets now support apple script so let's go ahead and open the NIV an interface builder and there's our new text field to hold the BCC addresses and we've added a BCC button to the people picker and we've already wired that up to a new ad BCC items method now what we have left to do is to use cocoa bindings to bind the value of that new text field to the BCC addresses to a new variable strangely enough call BCC addresses and we've got that all sets the police save the nib Tim and let's get back to Xcode so now that we have cocoa binding settings this new variable DCC addresses we need to actually use it in our script which is used is used to manage the actions user interface so Tim go ahead and add a line of code to read the BCC addresses out of the parameters block which is managed for with for us by Coco binding and here we're showing off in another great new feature in X go to point o that we now have code completion for applescript excellence and it saves that and famous you can just give us a brief tour that we already have the the rest of the Apple script code analogous to what we already had for the two and CC addresses and down at the bottom we're taking advantage of males great script ability to add the new DCC recipients to the new email message that the action will create for us alright that's all we needed to do in our script so let's please save that Tim and finally what we need to do is open up an objective c class and take a look at that new ad BCC items method and really all we needed to do was copy and paste and change 3 cc's to be cc's to read the value from the people picker and add it to the text field so great that's all we needed to do this add to this new feature so Tim if you would hit build and go please and we'll save our script and what we're doing here is taking advantage of a custom Automator executable to the great Xcode feature which has a launch argument which passes the newly built action to Automator when we launch it directly from Xcode this gives us a very efficient development cycle and very much like building a normal application so let's add our new our new new email action to the workflow and we see it's got a BCC field and the people picker has the button that allows us to add new addresses to that field so timmis use bcc me please and let's send a message to Ted since he's been so gracious as to let us share his stage and CC Tony and let's tell them look what a great combination that Automator and Xcode to point o our that's kind of a boring email so let's make it a little bit more interesting let's let's add an image to it strangely enough an image of another great combination and let's go ahead and run the workflow and there's our email with the beat VCC field correctly filled out and we've got the Venus transit a couple weeks back so in a few short minutes we've shown you how easy it is to use your development language of choice to create Automator actions and I hope that you'll all join me tomorrow morning at ten-thirty in the mission for a full session explaining just how easy it is to create a rich set of actions for your applications thanks very much dead thank God thanks Anna so yes tomorrow morning 1030 I think automator and we are connecting up applications going to be a very incredible thing we're asking all the application developers to really to think about in exposed very simple to expose an applescript interface and add these actions you can actually add automated actions in really the language of your choice it's very simple to do it with Apple script but it doesn't require applescript there's many tips different ways to do this really very simple set of nibs that can be copied dragged and pasted into the your project and to really enable this is a very as a terrific way to do it this technology grows out of work done to also enable UNIX shell scripting and many kinds of things so this is the foundational piece of Technology's I think you're going to see a lot of exciting things happening in some terrific way for many applications to become very integrated and to leverage the capabilities from one application to another for our customers benefits so to summarize Xcode continues to advance for Panther and tiger are we think that Xcode is helping people to build faster applications in less time so including both the performances of your applications both with compiled code and generated code and by taking advantage of new performance capabilities we think it's going to be extremely important to automator enable your application and we think the next code is really the new foundation for a large number of terrific things now I know many of you have seen that a few of us around here sporting these great shirts i want to invite which Siegel and Gabrielle state back up here want to hand them some shirts for being some of the first applications we're showing developed in Xcode Henry masseur thank you thank you and you have a little other little demo to show yeah so so while Ted was getting everything ready and showing off that automated demo I thought gee you know I really hope that Apple concentrates on security for that stuff because it can be really important you know in the tron game we get the sound there they'll be great no sound on try and gain a little problem yeah that's the danger of some of the stuff i'm sure you guys will do a great job little email scripts can run them up exactly thanks a lot gave so we have a few more shirts here but the fact when you come down to the apple campus on thursday we're going to have a lot more and if you bring your application running on a laptop and show us your application building in xcode then we'll have a shirt for you as well so i'm going to throw out of you now hahahahaha the only a few today you've got to show us your applications building an Xcode so thank you very much and have a great conference [Applause]