]> git.saurik.com Git - apple/system_cmds.git/blobdiff - kdprof/InitializeAction.cpp
system_cmds-643.30.1.tar.gz
[apple/system_cmds.git] / kdprof / InitializeAction.cpp
diff --git a/kdprof/InitializeAction.cpp b/kdprof/InitializeAction.cpp
new file mode 100644 (file)
index 0000000..e4943e5
--- /dev/null
@@ -0,0 +1,21 @@
+//
+//  InitializeAction.cpp
+//  kdprof
+//
+//  Created by James McIlree on 4/17/13.
+//  Copyright (c) 2013 Apple. All rights reserved.
+//
+
+#include "global.h"
+
+void InitializeAction::execute(Globals& globals) {
+       if (_buffers) {
+               if (!KDBG::set_buffer_capacity(_buffers)) {
+                       usage("Attempt to set buffer count failed");
+               }
+       }
+
+       if (!KDBG::initialize_buffers()) {
+               usage("Attempt to initialize buffers failed\n");
+       }
+}