]> git.saurik.com Git - apple/system_cmds.git/blob - kdprof/InitializeAction.cpp
system_cmds-670.1.2.tar.gz
[apple/system_cmds.git] / kdprof / InitializeAction.cpp
1 //
2 // InitializeAction.cpp
3 // kdprof
4 //
5 // Created by James McIlree on 4/17/13.
6 // Copyright (c) 2013 Apple. All rights reserved.
7 //
8
9 #include "global.h"
10
11 void InitializeAction::execute(Globals& globals) {
12 if (_buffers) {
13 if (!KDBG::set_buffer_capacity(_buffers)) {
14 usage("Attempt to set buffer count failed");
15 }
16 }
17
18 if (!KDBG::initialize_buffers()) {
19 usage("Attempt to initialize buffers failed\n");
20 }
21 }