Perciatelli, also called bucatini, is like thick round spaghetti with a hole down the center. Liguine or spaghetti can be used instead.
Bring a large pot of water to a boil; add 2 tablespoons salt. Add pasta; cook, according to package instructions, until al dente; drain.
Meanwhile, in a large deep frying pan, heat 3 tablespoons olive oil over medium-low heat. Add garlic and cook, turning, until browned, 6 to 8 minutes. Add cooked pasta, parsley, tomatoes, breadcrumbs, walnuts, red-pepper flakes, pecorino, remaining tablespoon olive oil, and salt and pepper; cook, tossing to combine, 1 to 2 minutes.
Divide pasta among 4 plates and serve immediately, garnished with shaved pecorino, if desired.