Permalink
Browse files

Adding Core Data Snippets, GC Snippets, Events Snippets,etc

  • Loading branch information...
Machx committed Jan 7, 2009
1 parent 1086e61 commit 23444c28fb7521a3d19f7f4e0a5209b33ddab79e
@@ -3,21 +3,21 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>Syntax Summary:
+ <string>pid$target::WaitNextEvent:entry
+{
+ self-&gt;evtPointer = (user_addr_t)arg1;
+ ustack();
+}
- Variables $TM_FILENAME, $TM_SELECTED_TEXT
- Fallback Values ${TM_SELECTED_TEXT:$TM_CURRENT_WORD}
- Substitutions ${TM_FILENAME/.*/\U$0/}
-
- Tab Stops $1, $2, $3, … $0 (optional)
- Placeholders ${1:default value}
- Mirrors &lt;${2:tag}&gt;&lt;/$2&gt;
- Transformations &lt;${3:tag}&gt;&lt;/${3/(\w*).*/\U$1/}&gt;
+pid$target::WaitNextEvent:return
+{
+ self-&gt;theEvent = (unsigned int)*(uint16_t*)copyin(self-&gt;evtPointer, 4);
- Shell Code `date`, `pwd`
+ this-&gt;eventStr = self-&gt;theEvent == 0 ? "Null Event" : self-&gt;theEvent == 1 ? "Mouse Down" : self-&gt;theEvent == 2 ? "Mouse Up" : self-&gt;theEvent == 3 ? "Key Down" : self-&gt;theEvent == 4 ? "Key Up" : self-&gt;theEvent == 5 ? "Auto Key" : self-&gt;theEvent == 6 ? "Update Event" : self-&gt;theEvent == 7 ? "Disk Event" : self-&gt;theEvent == 8 ? "Activate Event" : self-&gt;theEvent == 15 ? "OS Event" : self-&gt;theEvent == 23 ? "High Level Event" : "Unknown";
- Escape Codes \$ \` \\
-</string>
+ printf("Event Kind: %i Event Type: %s",self-&gt;theEvent,this-&gt;eventStr);
+ ustack();
+}</string>
<key>name</key>
<string>Carbon Events</string>
<key>scope</key>
@@ -3,21 +3,18 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>Syntax Summary:
+ <string>objc$target:NSApplication:-sendEvent*:entry
+{
+ self-&gt;evtPointer = (user_addr_t)arg2;
- Variables $TM_FILENAME, $TM_SELECTED_TEXT
- Fallback Values ${TM_SELECTED_TEXT:$TM_CURRENT_WORD}
- Substitutions ${TM_FILENAME/.*/\U$0/}
-
- Tab Stops $1, $2, $3, … $0 (optional)
- Placeholders ${1:default value}
- Mirrors &lt;${2:tag}&gt;&lt;/$2&gt;
- Transformations &lt;${3:tag}&gt;&lt;/${3/(\w*).*/\U$1/}&gt;
+ self-&gt;theEvent = (unsigned int)*(uint32_t*)copyin(self-&gt;evtPointer + 4, 4);
- Shell Code `date`, `pwd`
+ this-&gt;eventStr = self-&gt;theEvent == 1 ? "Left Mouse Down" : self-&gt;theEvent == 2 ? "Left Mouse Up" : self-&gt;theEvent == 3 ? "Right Mouse Down" : self-&gt;theEvent == 4 ? "Right Mouse Up" : self-&gt;theEvent == 5 ? "Mouse Moved" : self-&gt;theEvent == 6 ? "Left Mouse Dragged" : self-&gt;theEvent == 7 ? "Right Mouse Dragged" : self-&gt;theEvent == 8 ? "Mouse Entered" : self-&gt;theEvent == 9 ? "Mouse Exited" : self-&gt;theEvent == 10 ? "Key Down" : self-&gt;theEvent == 11 ? "Key Up" : self-&gt;theEvent == 12 ? "Flags Changed" : self-&gt;theEvent == 13 ? "AppKit Defined" : self-&gt;theEvent == 14 ? "System Defined" : self-&gt;theEvent == 15 ? "Application Defined" : self-&gt;theEvent == 16 ? "Periodic" : self-&gt;theEvent == 17 ? "Cursor Update" : self-&gt;theEvent == 22 ? "Scroll Wheel" : self-&gt;theEvent == 23 ? "Tablet Point" : self-&gt;theEvent == 24 ? "Tablet Proximit" : self-&gt;theEvent == 25 ? "Other Mouse Down" : self-&gt;theEvent == 26 ? "Other Mouse Up" : self-&gt;theEvent == 27 ? "Other Mouse Dragged" : "Unknown";
- Escape Codes \$ \` \\
-</string>
+ printf("Event Kind: %i Event Type: %s",self-&gt;theEvent,this-&gt;eventStr);
+
+ ustack();
+}</string>
<key>name</key>
<string>Cocoa Events</string>
<key>scope</key>
@@ -3,21 +3,33 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>Syntax Summary:
+ <string>CoreData\$target:CoreData::BeginFaultCacheMiss
+{
+ self-&gt;cacheMissStart = vtimestamp;
+ printf("Cache Miss: %s",copyinstr(arg0));
+ ustack();
+}
- Variables $TM_FILENAME, $TM_SELECTED_TEXT
- Fallback Values ${TM_SELECTED_TEXT:$TM_CURRENT_WORD}
- Substitutions ${TM_FILENAME/.*/\U$0/}
-
- Tab Stops $1, $2, $3, … $0 (optional)
- Placeholders ${1:default value}
- Mirrors &lt;${2:tag}&gt;&lt;/$2&gt;
- Transformations &lt;${3:tag}&gt;&lt;/${3/(\w*).*/\U$1/}&gt;
+CoreData\$target:CoreData::EndFaultCacheMiss
+{
+ self-&gt;cacheMissEnd = (vtimestamp - self-&gt; cacheMissStart) / 1000;
+ printf("Cache Miss Duration: %u",self-&gt;cacheMissEnd);
+ ustack();
+}
- Shell Code `date`, `pwd`
+CoreData\$target:CoreData::BeginRelationshipCacheMiss
+{
+ self-&gt;relationshipCacheMissStart = vtimestamp;
+ printf("RCM Relationship: %s RCM Source: %s",copyinstr(arg0),copyinstr(arg1));
+ ustack();
+}
- Escape Codes \$ \` \\
-</string>
+CoreData\$target:CoreData::EndRelationshipCacheMiss
+{
+ self-&gt; relationshipCacheMissEnd= (vtimestamp - self-&gt; relationshipCacheMissStart) / 1000;
+ printf("RCM Duration: %u",self-&gt; relationshipCacheMissEnd);
+ ustack();
+}</string>
<key>name</key>
<string>Core Data Cache Misses</string>
<key>scope</key>
@@ -3,21 +3,33 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>Syntax Summary:
+ <string>CoreData\$target:CoreData::BeginFault
+{
+ self-&gt;faultStart = vtimestamp;
+ printf("Fault Object: %s",copyinstr(arg0));
+ ustack();
+}
- Variables $TM_FILENAME, $TM_SELECTED_TEXT
- Fallback Values ${TM_SELECTED_TEXT:$TM_CURRENT_WORD}
- Substitutions ${TM_FILENAME/.*/\U$0/}
-
- Tab Stops $1, $2, $3, … $0 (optional)
- Placeholders ${1:default value}
- Mirrors &lt;${2:tag}&gt;&lt;/$2&gt;
- Transformations &lt;${3:tag}&gt;&lt;/${3/(\w*).*/\U$1/}&gt;
+CoreData\$target:CoreData::EndFault
+{
+ self-&gt;faultEnd= (vtimestamp - self-&gt;faultStart) / 1000;
+ printf("Fault Duration: %u",self-&gt;faultEnd);
+ ustack();
+}
- Shell Code `date`, `pwd`
+CoreData\$target:CoreData::BeginRelationshipFault
+{
+ self-&gt;relationshipFaultStart = vtimestamp;
+ printf("Relationship Fault Source: %s Relationship: %s",copyinstr(arg0),copyinstr(arg1));
+ ustack();
+}
- Escape Codes \$ \` \\
-</string>
+CoreData\$target:CoreData::EndRelationshipFault
+{
+ self-&gt;relationshipFaultEnd= (vtimestamp - self-&gt;relationshipFaultStart) / 1000;
+ printf("Relationship Fault Duration: %u",self-&gt;relationshipFaultEnd);
+ ustack();
+}</string>
<key>name</key>
<string>Core Data Faults</string>
<key>scope</key>
@@ -3,21 +3,19 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>Syntax Summary:
+ <string>CoreData\$target:CoreData::BeginFetch
+{
+ self-&gt;fetchStart = vtimestamp;
+ printf("Entity: %s",copyinstr(arg0));
+ ustack();
+}
- Variables $TM_FILENAME, $TM_SELECTED_TEXT
- Fallback Values ${TM_SELECTED_TEXT:$TM_CURRENT_WORD}
- Substitutions ${TM_FILENAME/.*/\U$0/}
-
- Tab Stops $1, $2, $3, … $0 (optional)
- Placeholders ${1:default value}
- Mirrors &lt;${2:tag}&gt;&lt;/$2&gt;
- Transformations &lt;${3:tag}&gt;&lt;/${3/(\w*).*/\U$1/}&gt;
-
- Shell Code `date`, `pwd`
-
- Escape Codes \$ \` \\
-</string>
+CoreData\$target:CoreData::EndFetch
+{
+ self-&gt;fetchEnd = (vtimestamp - self-&gt; fetchStart) / 1000;
+ printf("Fetch Count: %i Duration: %u",arg0,self-&gt;fetchEnd;
+ ustack();
+}</string>
<key>name</key>
<string>Core Data Fetches</string>
<key>scope</key>
@@ -3,21 +3,18 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>Syntax Summary:
+ <string>CoreData\$target:CoreData::BeginSave
+{
+ self-&gt; saveStart = vtimestamp;
+ ustack();
+}
- Variables $TM_FILENAME, $TM_SELECTED_TEXT
- Fallback Values ${TM_SELECTED_TEXT:$TM_CURRENT_WORD}
- Substitutions ${TM_FILENAME/.*/\U$0/}
-
- Tab Stops $1, $2, $3, … $0 (optional)
- Placeholders ${1:default value}
- Mirrors &lt;${2:tag}&gt;&lt;/$2&gt;
- Transformations &lt;${3:tag}&gt;&lt;/${3/(\w*).*/\U$1/}&gt;
-
- Shell Code `date`, `pwd`
-
- Escape Codes \$ \` \\
-</string>
+CoreData\$target:CoreData::BeginSave
+{
+ self-&gt;saveEnd = (vtimestamp - self-&gt;saveStart) / 1000;
+ trace(self-&gt;saveEnd);
+ ustack();
+}</string>
<key>name</key>
<string>Core Data Saves</string>
<key>scope</key>
@@ -3,21 +3,19 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>Syntax Summary:
+ <string>pid\$target::auto_trace_phase_begin:entry
+/arg1 == 0 &amp;&amp; arg2 == 3/
+{
+ self-&gt;starttime = walltimestamp/1000;
+ ustack();
+}
- Variables $TM_FILENAME, $TM_SELECTED_TEXT
- Fallback Values ${TM_SELECTED_TEXT:$TM_CURRENT_WORD}
- Substitutions ${TM_FILENAME/.*/\U$0/}
-
- Tab Stops $1, $2, $3, … $0 (optional)
- Placeholders ${1:default value}
- Mirrors &lt;${2:tag}&gt;&lt;/$2&gt;
- Transformations &lt;${3:tag}&gt;&lt;/${3/(\w*).*/\U$1/}&gt;
-
- Shell Code `date`, `pwd`
-
- Escape Codes \$ \` \\
-</string>
+pid\$target::auto_trace_phase_end:entry
+/arg1 == 0 &amp;&amp; arg2 == 3/
+{
+ printf("AutoZone - Zone %i Is Generational %i - Bytes Reclaimed: %i Objects Reclaimed: %i - Duration: %u",arg0,arg1,(int)arg4,(int)arg3,(walltimestamp/1000) - self-&gt;starttime);
+ ustack();
+}</string>
<key>name</key>
<string>Garbage Collection Scavenge Data</string>
<key>scope</key>
@@ -3,21 +3,11 @@
<plist version="1.0">
<dict>
<key>content</key>
- <string>Syntax Summary:
-
- Variables $TM_FILENAME, $TM_SELECTED_TEXT
- Fallback Values ${TM_SELECTED_TEXT:$TM_CURRENT_WORD}
- Substitutions ${TM_FILENAME/.*/\U$0/}
-
- Tab Stops $1, $2, $3, … $0 (optional)
- Placeholders ${1:default value}
- Mirrors &lt;${2:tag}&gt;&lt;/$2&gt;
- Transformations &lt;${3:tag}&gt;&lt;/${3/(\w*).*/\U$1/}&gt;
-
- Shell Code `date`, `pwd`
-
- Escape Codes \$ \` \\
-</string>
+ <string>pid\$target::auto_trace_collection_end:entry
+{
+ printf("AutoZone - Objects Reclaimed: %i - Bytes Reclaimed: %i - Bytes in Use: %i - Total: %i",(int)arg2,(int)arg3,(int)arg4,(int)arg5);
+ ustack();
+}</string>
<key>name</key>
<string>Garbage Collection Total</string>
<key>scope</key>

0 comments on commit 23444c2

Please sign in to comment.