Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(134)

Unified Diff: experimental/LightSymbolsUtil/lightsymbols/helper.h

Issue 1512753006: Remove unused CallStacker (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: experimental/LightSymbolsUtil/lightsymbols/helper.h
diff --git a/experimental/LightSymbolsUtil/lightsymbols/helper.h b/experimental/LightSymbolsUtil/lightsymbols/helper.h
deleted file mode 100644
index 62f375a396a5bc19fc58addaa878bca1182daa12..0000000000000000000000000000000000000000
--- a/experimental/LightSymbolsUtil/lightsymbols/helper.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#include <stdlib.h>
-#define CANVAS_PATH "CANVAS_PATH"
-
-class SkFile {
- FILE* file;
- bool busted;
- char* sz;
- mutable int i;
-
-public:
- SkFile(unsigned long id) {
- file = NULL;
- busted = false;
- sz = new char[100000];
- set(id);
- i = 100;
- }
-
- ~SkFile() {
- delete sz;
- if (file) {
- fclose(file);
- }
- }
-
- void set(unsigned long id) {
- if (busted) {
- return;
- }
-
- if (file == NULL) {
- char sz[10000];
- sprintf(sz, "%s\\%ul.callstacks.txt", getenv(CANVAS_PATH), id);
- file = fopen(sz, "a");
- if (file == NULL) {
- busted = true;
- }
- fprintf(file, "\n\n\nNEW SESSION, just coliding ids ... should generate a new file ideally ... \n\n\n");
- }
- }
-
- void appendLine(const char* sz) const {
- if (busted) {
- return;
- }
-
- fprintf(file, "%s\n", sz);
- }
-
- void dump(bool flush = false) const {
- if (busted) {
- return;
- }
-
- LightSymbol::GetCallStack(sz, 100000, " >- ");
- appendLine(sz);
-
- i--;
-
- if (i < 0 || flush) {
- i = 100;
- fflush(file);
- }
- }
-};

Powered by Google App Engine
This is Rietveld 408576698